Postgresql致命错误

Gee*_*eek 6 postgresql

我正在使用postgresql.错误地,我通过命令授予postgresql文件夹权限

chmod -R 777 /var/lib/postgresql/
Run Code Online (Sandbox Code Playgroud)

现在,当我尝试连接到postgresql时,它给了我以下错误.

The PostgreSQL server failed to start. Please check the log output:
2013-09-19 07:21:48 GMT FATAL:  data directory
"/var/lib/postgresql/8.4/main" has group or world access 2013-09-19
07:21:48 GMT DETAIL:  Permissions should be u=rwx (0700).
Run Code Online (Sandbox Code Playgroud)

尝试通过命令重启postgresql服务器

/etc/init.d/postgresql restart 
Run Code Online (Sandbox Code Playgroud)

但得到同样的错误.

我该怎么办?

Chr*_*ers 7

PostgreSQL需要独占访问数据目录中的文件.通过chmod 700在数据目录上使用或右键单击并在Windows上选择各种选项,可以根据您的操作系统进行修复.