Friday, 22 April 2022

Unable to start postgres db with db=,user=,app=,client=DETAIL: Permissions should be u=rwx (0700) error

Unable start postgres database, when i tried to start db it exit with below error data10 #  systemctl start edb-as-10

Job for edb-as-10.service failed because the control process exited with error code. See "systemctl status edb-as-10.service" and "journalctl -xe" for details.

Verified pgstartup.log file

[enterprisedb@postgresvm01 log]$ cat pgstartup.log

WARNING --> PERL_INSTALL_PATH is not set in /u01/edb/as10/etc/sysconfig/plLanguages.config file

WARNING --> PYTHON_INSTALL_PATH is not set in /u01/edb/as10/etc/sysconfig/plLanguages.config file

WARNING --> TCL_INSTALL_PATH is not set in /u01/edb/as10/etc/sysconfig/plLanguages.config file

2022-04-22 08:34:34 PDT [6885]: [1-1] db=,user=,app=,client=FATAL:  data directory "/pg_base/data10" has group or world access

2022-04-22 08:34:34 PDT [6885]: [2-1] db=,user=,app=,client=DETAIL:  Permissions should be u=rwx (0700).

Startup command failing due to permission issues 

Check Permission # ls -ltr

total 8

drwxr-xr-x. 22 enterprisedb enterprisedb 4096 Apr 22 08:31 data10

Change Permission # chmod 700 data10 # ls -ltr

total 8

drwx------. 22 enterprisedb enterprisedb 4096 Apr 22 08:31 data10

Db came up without any issues #systemctl start edb-as-10 # systemctl status edb-as-10

● edb-as-10.service - EDB Postgres Advanced Server 10

   Loaded: loaded (/usr/lib/systemd/system/edb-as-10.service; enabled; vendor preset: disabled)

   Active: active (running) since Fri 2022-04-22 08:37:47 PDT; 2h 8min ago

  Process: 6887 ExecStopPost=/bin/bash -c rm -f /var/lock/edb/as10/edb-as-10 (code=exited, status=0/SUCCESS)

  Process: 27092 ExecStop=/u01/edb/as10/bin/pg_ctl stop -m fast -w -D /pg_base/data10 (code=exited, status=0/SUCCESS)

  Process: 7294 ExecStartPost=/bin/bash -c touch /var/lock/edb/as10/edb-as-10 (code=exited, status=0/SUCCESS)

  Process: 7212 ExecStart=/bin/bash -c /usr/lib/systemd/system/ (code=exited, status=0/SUCCESS)

 Main PID: 7234 (edb-postgres)

   Memory: 7.4G

   CGroup: /system.slice/edb-as-10.service

           ─7234 /u01/edb/as10/bin/edb-postgres -D /pg_base/data10

           ─7235 postgres: logger process

           ─7236 postgres: startup process   recovering 0000000400001E420000006E

           ─7257 postgres: checkpointer process

           ─7258 postgres: writer process

           ─7292 postgres: stats collector process

           ─7293 postgres: wal receiver process   streaming 1E42/6E09A000

           └─7392 postgres: enterprisedb edb [local] idle