gpstart fails due to "Permissions should be u=rwx (0700)"
search cancel

gpstart fails due to "Permissions should be u=rwx (0700)"

book

Article ID: 295917

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Symptoms:

gpstart fails with the following message:

[gpadmin@dev_mdw ~]$ gpstart -R
20150220:21:02:04:023998 gpstart:dev_mdw:gpadmin-[INFO]:-Starting gpstart with args: -R
20150220:21:02:04:023998 gpstart:dev_mdw:gpadmin-[INFO]:-Gathering information and validating the environment...
20150220:21:02:04:023998 gpstart:dev_mdw:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.2.7.3 build 1'
20150220:21:02:04:023998 gpstart:dev_mdw:gpadmin-[INFO]:-Greenplum Catalog Version: '201109210'
20150220:21:02:04:023998 gpstart:dev_mdw:gpadmin-[INFO]:-Starting Master instance in admin mode
20150220:21:02:06:023998 gpstart:dev_mdw:gpadmin-[CRITICAL]:-Failed to start Master instance in admin mode
20150220:21:02:06:023998 gpstart:dev_mdw:gpadmin-[CRITICAL]:-Error occurred: non-zero rc: 1
 Command was: 'env GPSESSID=0000000000 GPERA=None $GPHOME/bin/pg_ctl -D /data/master/gpseg-1 -l /data/master/gpseg-1/pg_log/startup.log -w -t 600 -o " -p 5432 -b 1 -z 0 --silent-mode=true -i -M master -C -1 -x 50 -c gp_role=utility " start'
rc=1, stdout='waiting for server to start......could not start server
', stderr='pg_ctl: PID file "/data/master/gpseg-1/postmaster.pid" does not exist
'

The master log at $MASTER_DATA_DIRECTORY/pg_log has a startup.log file. The startup log indicates there is an issue with the permission of the master data directory:

[gpadmin@dev_mdw pg_log] tail -2 startup.log
2015-02-20 15:43:38.844824 GMT,,,p24430,th1494547872,,,,0,,,seg-1,,,,,"FATAL","55000","data directory ""/data/master/gpseg-1"" has group or world access","Permissions should be u=rwx (0700).",,,,,,,"checkDataDir","postmaster.c",1779, 

Environment


Cause

The permission on the master data directory was modified from the default value of 700. This should not be done, it is set to this vale for security reasons:

[gpadmin@dev_mdw pg_log]$ ls -ltr $MASTER_DATA_DIRECTORY/..
drwxr-xr-x 19 gpadmin gpadmin 8192 Feb 20 20:32 gpseg-1 

Resolution

Change the permission back to its correct value and then restart the database:

[gpadmin@dev_mdw master]$ chmod 700 $MASTER_DATA_DIRECTORY
[gpadmin@dev_mdw master]$