Postgresql fatal error

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?


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.

Need Your Help

How do i sign variables?

c# .net security encryption signing

I have a few variables that must be stored on the client side. As usual anything on client side can be tampered. I would like to sign a few variables and verified them when the data is sent back to...

How do I make a PHP call whenever a form element is clicked?

php javascript jquery html

I have a jQuery colorbox opened over top of my webpage (with a <select> drop down list) and I'd like to make an AJAX call every time a new <option> is selected from the drop down.