Postgres 卸载:“server.key 具有组或世界访问权限”错误

Postgres 卸载:“server.key 具有组或世界访问权限”错误

我正在尝试卸载 postgresql,但它确实在抱怨。我怀疑有什么东西坏了。我使用的是 12.04,通过 apt-get 安装。

sudo apt-get remove postgresql

返回:

Reading package lists... Done 
Building dependency tree Reading state information... Done
Package postgresql is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
2 not fully installed or removed. After this operation, 0 B of
additional disk space will be used. Setting up postgresql-common
(129ubuntu1) ...  * Starting PostgreSQL 9.1 database server           
* The PostgreSQL server failed to start. Please check the log output: 2013-07-12 11:13:30 

BST FATAL:  private key file "server.key" has
group or world access 2013-07-12 11:13:30 

BST 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".

invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql-9.1:
postgresql-9.1 depends on postgresql-common (>= 115~); however:
Package postgresql-common is not configured yet.
dpkg: error processing postgresql-9.1 (--configure):
dependency problems - leaving unconfigured

现在我尝试修复 server.key 文件;我将蛇油文件复制到然后/var/lib/postgresql/9.1/main/server.key对其进行了修改:

chmod 700 server.key
chown postgres:postgres server.key

完整性检查:

ls -l server.key

-rwx------ 1 postgres postgres 887 Jul 12 10:07 server.key

但它仍然抱怨该文件具有群组访问权限。

非常感激任何帮助删除此问题的信息,强制重新安装install -f没有帮助。:(

答案1

通过清除此包修复

sudo apt-get purge postgresql-common

相关内容