复制C9工作区与Rails应用程序,PostgreSQL服务将无法启动:权限被拒绝

时间:2017-08-15 07:03:24

标签: ruby-on-rails postgresql cloud9-ide cloud9

我刚刚使用功能正常的Ruby on Rails应用程序复制了一个C9工作区,似乎无法运行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,但我不知道该怎么做。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

通过运行此命令修复它:

gpasswd -a postgres ssl-cert

然后启动了postgresql服务器,它运行得很好!