'Permission denied' when using some psql commands
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Leonardo Fagundes Luz Serrano |
Bug Description
Brief Description
-------------
When using psql, command '\e' will give a permission error for /var/lib/
The directory is owned by "postgres" user on centos and by "root" on debian.
Severity
-------------
Minor
Steps to Reproduce
-------------
In the controller, enter postgres cli with "sudo -u postgres psql" then try using the "\e" command.
Expected Behavior
-------------
No warning. File "/var/lib/
Actual Behavior
-------------
'Permission denied' error message when trying to create "/var/lib/
Reproducibility
-------------
Reproducible
System Configuration
-------------
AIO-SX IPv4
Load info (eg: 2022-03-
-------------
###
Wind River Cloud Platform
Release 22.06
###
Wind River Systems, Inc.
###
SW_VERSION="22.06"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID=
SRC_BUILD_ID="236"
JOB="stx-
BUILD_BY="jenkins"
BUILD_NUMBER="236"
BUILD_HOST=
BUILD_DATE=
Last Pass
-------------
Unknown
Timestamp/Logs
-------------
On debian:
sysadmin@
drwxr-xr-x 4 root root 4096 Jul 25 17:46 postgresql
sysadmin@
psql (13.5 (Debian 13.5-0+deb11u1))
Type "help" for help.
postgres=# \e
touch: cannot touch '/var/lib/
Unable to create directory /var/lib/
It is required for saving/loading search history or cursor positions.
(output of command given to editor)
On centos:
controller-0:~$ ls -la /var/lib | grep postgres
drwx------. 4 postgres postgres 4096 Jul 25 13:57 pgsql
drwxr-xr-x 3 postgres postgres 4096 Jul 25 14:16 postgresql
controller-0:~# sudo -u postgres psql
could not change directory to "/root"
psql (9.2.24)
Type "help" for help.
postgres=# \e
(output of command given to editor)
Alarms
-------------
NA
Test Activity
-------------
NA
Workaround
-------------
Fix /var/lib/postgresql permission with:
sudo chown -R postgres:postgres /var/lib/postgresql
Changed in starlingx: | |
importance: | Undecided → Medium |
assignee: | nobody → Leonardo Fagundes Luz Serrano (lfagunde) |
tags: | added: stx.8.0 stx.config stx.debian |
Fix proposed to branch: master /review. opendev. org/c/starlingx /stx-puppet/ +/851254
Review: https:/