Raspberry-Pi

重啟後 Postgresql 不會啟動。卡利 Linux 樹莓派 2

  • May 24, 2015

幾天來我一直在嘗試讓 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!

我已閱讀有關該主題的所有相關文章,它們並沒有解決我的問題,因此有所不同。我不知道具體怎麼做,我可以提供任何需要的額外資訊。

我有同樣的問題並設法通過以下方式解決它:

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

引用自:https://unix.stackexchange.com/questions/205320