2017-08-15 76 views
0

我剛剛複製了C9工作區與功能的Ruby on Rails應用程序,似乎無法讓PostgreSQL服務運行。複製C9工作區與Rails應用程序,PostgreSQL服務將無法啓動:權限被拒絕

運行此命令:

sudo service postgresql start 

返回此錯誤:

The PostgreSQL server failed to start. Please check the log output: 
2017-08-15 06:50:57 UTC FATAL: could not remove old lock file "postmaster.pid": Permission denied 
2017-08-15 06:50:57 UTC HINT: The file seems accidentally left over, but it could not be removed. Please remove the file by hand and try again. 

再次刪除這個文件手動和運行後:

The PostgreSQL server failed to start. Please check the log output: 
2017-08-15 07:01:45 UTC FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied 

我猜我需要設置一些權限訪問PostgreSQL,但我不知道該怎麼做。有任何想法嗎?

+0

'/ etc/ssl/private/ssl-cert-snakeoil.key'確實存在嗎? – Babar

+0

是的,但我必須進入控制檯中的超級用戶才能訪問它。 @Babar –

回答

0

運行以下命令修正它:

gpasswd -a postgres ssl-cert 

然後開始PostgreSQL服務器和它的工作就好了!

相關問題