我相信我最终混淆了 /etc/ssl 目录树的权限,因为最后一次修改是在 11 月 18 日以及我无法让 PostgreSQL 工作的第二天进行的。
当我输入时
sudo 服务 postgresql 启动
I get
致命:无法访问私钥文件“/etc/ssl/private/ssl-cert-snakeoil.key”:权限被拒绝
检查权限
〜$须藤-i
〜$ ls -la /etc/ssl/private
drw-r----- 2 root ssl-cert 4096 11 月 18 日 21:10 。
-rwxrwxrwx 1 postgres postgres 1704 设置 4 11:26 ssl-cert-snakeoil.key
检查组构成
~$ id postgres
uid=114(postgres) gid=127(postgres) groups=127(postgres),114(ssl-cert)
我还注意到 /etc/ssl/certs/ 中的 ssl-cert-snakeoil.pem 文件没有符号链接。我不知道这是否有什么区别......
请帮我解决这个问题。
Thanks.
编辑:是否应该发布在服务器故障反而?
尝试添加postgres
用户加入组ssl-cert
运行以下代码来解决您的问题:
# > It happened to me and it turned out that I removed erroneously the postgres user from "ssl-cert" group, set it back with
sudo gpasswd -a postgres ssl-cert
# Fixed ownership and mode
sudo chown root:ssl-cert /etc/ssl/private/ssl-cert-snakeoil.key
sudo chmod 740 /etc/ssl/private/ssl-cert-snakeoil.key
# now postgresql starts! (and install command doesn't fail anymore)
sudo /etc/init.d/postgresql start
礼貌地加布勒鲁 https://gist.github.com/GabLeRoux/0c60f9be0c28b6b41f64cb55474b0ccb
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)