PostgreSQL数据文件权限不对导致开机启动失败
发布时间:2020-12-13 17:41:24 所属栏目:百科 来源:网络整理
导读:上午开发告知机子重启后DB连接不了了,登进去一开,确实,进程啥的都没有起来。 手工启动: [postgres@develop ~]$ pg_start server starting [postgres@develop ~]$ps -ef|grep postgres 发现还是没起来,查看日志,里面有如此报错信息: [postgres @develop
上午开发告知机子重启后DB连接不了了,登进去一开,确实,进程啥的都没有起来。
信息给得很详细,postgresql的数据文件权限被改了,起码现在不是0700(只有用户权限)。返回去一看, 现在果然是777权限了。而且用户的所属也被改了,改成其他用户了。 [postgres@develop ~]$ ll /home/postgres drwxrwxrwx 14 tomcat ddd 4096 10-29 09:41 data 改回去: [postgres@develop ~]$chown -R postgres:postgres /home/postgres/data [postgres@develop ~]$chmod 0700 /home/postgres/data 查看: drwx------ 14 postgres postgres 4096 10-29 09:41 data 再启动 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |