7

I am using postgresql. By mistake i gave permission to the postgresql folder through the command

chmod -R 777 /var/lib/postgresql/

Now that when i am trying to connect to postgresql it is giving me the following error.

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).

tried restarting postgresql server through command

/etc/init.d/postgresql restart 

but getting the same error.

what shall i do?

2
  • 1
    Doesn’t the message already tell you what you should do …? Commented Sep 19, 2013 at 7:48
  • 5
    chmod -R 700 /var/lib/postgresql/ ? Commented Sep 19, 2013 at 7:50

1 Answer 1

9

PostgreSQL requires exclusive access to the files in the data directory. This is fixable depending on your operating system by using chmod 700 on the data directory or by right-clicking, and selecting various options on Windows.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.