![Postgresql 重启后无法启动。 Kali Linux Raspberry Pi 2](https://linux22.com/image/65655/Postgresql%20%E9%87%8D%E5%90%AF%E5%90%8E%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8%E3%80%82%20Kali%20Linux%20Raspberry%20Pi%202%20.png)
几天来我一直在尝试让 postgresql 工作,并且在重新启动之前它短暂地工作了。如何设置正确的权限?这是我在重新启动后尝试启动服务时收到的错误。
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!
我已阅读有关该主题的所有相关帖子,它们没有解决我的问题,所以这是不同的。我不知道具体如何,我可以提供所需的任何额外信息。
答案1
我遇到了同样的问题并设法通过以下方式解决它:
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