Environment
Novell Data Synchronizer Mobility Pack
Situation
postgresql will not start giving "Permission denied" errors
Resolution
- Open a terminal and type "cd /var/lib"
- Type "ll" to show the permissions, for pgsql it should have the owner and group as postgres postgress
- If it is not, type in "chown -R postgres:postgres pgsql"
- Start postgresql by typing "rcpostgresql start" and it should now start successfully
Cause
postgresql not starting because the ownership is incorrect on /var/lib/pgsql
Additional Information
Notes:
rcpostgresql start
Starting PostgreSQL 8.3.23 su: warning: cannot change directory to /var/lib/pgsql: Permission denied
-bash: /var/lib/pgsql/.bash_profile: Permission denied
could not change directory to "/root"
pg_ctl: could not open PID file "/var/lib/pgsql/data/postmaster.pid": Permission denied
su: warning: cannot change directory to /var/lib/pgsql: Permission denied
-bash: /var/lib/pgsql/.bash_profile: Permission denied
could not change directory to "/root"
pg_ctl: could not open PID file "/var/lib/pgsql/data/postmaster.pid": Permission denied
failed
Starting PostgreSQL 8.3.23 su: warning: cannot change directory to /var/lib/pgsql: Permission denied
-bash: /var/lib/pgsql/.bash_profile: Permission denied
could not change directory to "/root"
pg_ctl: could not open PID file "/var/lib/pgsql/data/postmaster.pid": Permission denied
su: warning: cannot change directory to /var/lib/pgsql: Permission denied
-bash: /var/lib/pgsql/.bash_profile: Permission denied
could not change directory to "/root"
pg_ctl: could not open PID file "/var/lib/pgsql/data/postmaster.pid": Permission denied
failed