Pages

Tuesday, July 31, 2012

PostgreSQL Permission Denied

To debug and fix issues related to permission problem with PostgreSQL, especially so when creating tablespaces, the following is useful:
  • Disable firewalls and selinux
  • Check which user is postgres server running as. 
  • Assuming it is running as postgres user, login as user postgres
  • Check "id" to ensure user postgres is part of group postgres 
  • Create the tablespace directory at the required location using mkdir. If you get permission error, fix that and retry. Do not create the directory as root.
The problem should be fixed.

Please leave a comment to share what worked for you to resolve PostgreSQL permission problems. Thanks!





No comments:

Post a Comment