Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nitsx2/d6eae6d16cc58b840f78beb22d8ada3a to your computer and use it in GitHub Desktop.
Save nitsx2/d6eae6d16cc58b840f78beb22d8ada3a to your computer and use it in GitHub Desktop.
Fix postgresql error FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied
# > It happened to me and it turned out that I removed erroneously the postgres user from "ssl-cert" group, set it back with
gpasswd -a postgres ssl-cert
# Fixed ownership and mode
sudo chown root:ssl-cert /etc/ssl/private/ssl-cert-snakeoil.key
sudo chmod 740 /etc/ssl/private/ssl-cert-snakeoil.key
# now postgresql starts! (and install command doesn't fail anymore)
sudo /etc/init.d/postgresql start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment