复制C9工作区与Rails应用程序,PostgreSQL服务将无法启动:权限被拒绝
问题描述:
我刚刚复制了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,但我不知道该怎么做。有任何想法吗?
答
运行以下命令修正它:
gpasswd -a postgres ssl-cert
然后开始PostgreSQL服务器和它的工作就好了!
'/ etc/ssl/private/ssl-cert-snakeoil.key'确实存在吗? – Babar
是的,但我必须进入控制台中的超级用户才能访问它。 @Babar –