2

I have been trying for days to get postgresql to work and it did briefly before a restart. How to I set the correct permissions? This is the error I get when I try to start the service after a reboot.

root@kali:~# service postgresql start
[....] Starting PostgreSQL 9.1 database server: main[....] The PostgreSQL server failed to start. Please check the log output: 
2015-05-24 08:51:21 UTC LOG: database system was interrupted; last known up at 2015-05-24 07:33:08 UTC 
2015-05-24 08:51:22 UTC FATAL: could not open file "/etc/ssl/certs/ssl-cert-snakeoil.pem": Permission denied 
2015-05-24 08:51:22 UTC LOG: startup process (PID 2505) exited with exit code 1 
2[FAIL5-24 08:51:22 UTC LOG: aborting startup due to startup process failure ... failed!
 failed!

I have read all the related posts on the subject, they didn’t solve my problem, so it's different. I don’t know exactly how, I can provide any extra info that is required.

Anthon
  • 78,313
  • 42
  • 165
  • 222
Hani Umer
  • 45
  • 1
  • 6

1 Answers1

1

I had the same issue and managed to fix it by:

cd /etc/ssl/certs/
chown postgres ssl-cert-snakeoil.pem
chmod 777 ssl-cert-snakeoil.pem

cd /etc/ssl/private
chown postgres ssl-cert-snakeoil.key
chmod 700 ssl-cert-snakeoil.key
Alexul
  • 26
  • 2
  • Thanks for the help, I did something similiar to that like an hour ago. works now. chown postgres:postgres ssl-cert-snakeoil.pem and chown postgress:postgress ssl-snakeoil.key – Hani Umer May 24 '15 at 12:48