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



我刚刚复制了一个带有功能性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的权限访问权限,但我不确定如何做到这一点。有什么想法吗?

通过运行以下命令修复了它:

gpasswd -a postgres ssl-cert

然后启动了 postgresql 服务器,它工作得很好!

最新更新