Skip to content

Instantly share code, notes, and snippets.

@ashleygwilliams
Created June 8, 2015 14:44
Show Gist options
  • Save ashleygwilliams/1b8f765b118ae9fead6b to your computer and use it in GitHub Desktop.
Save ashleygwilliams/1b8f765b118ae9fead6b to your computer and use it in GitHub Desktop.
(jessie)ag_dubs@localhost:~/Mozilla/publish.webmaker.org$ /usr/lib/postgresql/9.4/bin/postgres -D /usr/local/pgsql/data -c config_file=/etc/postgresql/9.4/main/postgresql.conf2015-06-08 10:43:32 EDT [5938-1] FATAL: data directory "/var/lib/postgresql/9.4/main" has group or world access
2015-06-08 10:43:32 EDT [5938-2] DETAIL: Permissions should be u=rwx (0700).
@ashleygwilliams
Copy link
Author

(jessie)ag_dubs@localhost:/Mozilla/publish.webmaker.org$ /usr/lib/postgresql/9.4/bin/postgres -D /usr/local/pgsql/data -c config_file=/etc/postgresql/9.4/main/postgresql.conf2015-06-08 10:47:24 EDT [7027-1] FATAL: data directory "/var/lib/postgresql/9.4/main" has group or world access
2015-06-08 10:47:24 EDT [7027-2] DETAIL: Permissions should be u=rwx (0700).
(jessie)ag_dubs@localhost:
/Mozilla/publish.webmaker.org$ chmod 700 /var/lib/postgresql/9.4/main
(jessie)ag_dubs@localhost:~/Mozilla/publish.webmaker.org$ /usr/lib/postgresql/9.4/bin/postgres -D /usr/local/pgsql/data -c config_file=/etc/postgresql/9.4/main/postgresql.conf2015-06-08 10:47:44 EDT [7172-1] FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied

@alanpca
Copy link

alanpca commented Jun 8, 2015

Try running postgres as root (sudo), it's likely that the ssl cert file is root-owned. Alternatively, you can keep running into these errors and opening up permissions for your ag_dubs account.

@FotoVerite
Copy link

You need to cp the private key that postgres comes installed with would be in the main directory then chown own it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment