linux - PostgreSQL 无法启动 : "server.key" has group or world access

标签 linux postgresql openerp odoo private-key

当我使用命令启动 PostgreSQL 时:

$ sudo /etc/init.d/postgresql start

Pg 没有启动。报错是:

 * Starting PostgreSQL 8.4 database server
 * The PostgreSQL server failed to start. Please check the log output:
2010-01-21 22:10:00 PST FATAL: private key file "server.key" has group or world access
2010-01-21 22:10:00 PST DETAIL: File must be owned by the database user or root, must have no write permission for "group", and must have no permissions for "other".

...当我尝试以 postgres 用户身份访问 psql 时:

$ sudo su postgres
$ psql

它给我一个错误:

 could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

最佳答案

我用..解决了它

1)进入相关目录(使用>locate server.key)

2) 备份旧的 server.key 链接。

3) 将ssl-cert-snakeoil.key复制到server.key

4-5) 将其所有者和组更改为 postgres

6) 确保权限为 700 或 740(根据错误消息的要求)

我的 Ubuntu 12.04 和 postgresql-8.3 的配方:

sudo cd /var/lib/postgresql/8.3/main/
sudo mv server.key server.key-0
sudo cp /etc/ssl/private/ssl-cert-snakeoil.key server.key
sudo chown postgres server.key
sudo chgrp postgres server.key
sudo chmod 740 server.key
sudo /etc/init.d/postgres-8.3 start

现在开始工作了! 感谢支持。

关于linux - PostgreSQL 无法启动 : "server.key" has group or world access,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12087683/

相关文章:

SQL:创建一个包含 24 小时行的表

python - 如何从 many2one 字段中删除创建和编辑...?

linux - 多线程访问平台设备驱动程序

linux - 如何让Alpine OS安装.run文件?

sql - 在不更新或插入的情况下用另一个文本替换输出行文本

openerp - 将特定日期分配给 Odoo 10 中的日期时间字段

python-2.7 - 仅对一行值应用复选框条件,否则在 Odoo10 中显示警告

linux - 编辑 shadow 和 passwd 以清除 root 密码,但新密码不起作用

linux - 如何通过 shell linux 使用 grep 精确搜索文件中的字符串?

PostgreSQL : How to pass a request to a function