title: Postgresql fatal error
body: <p>I am using postgresql. By mistake i gave permission to the postgresql folder through the command </p>
  
  <pre><code>chmod -R 777 /var/lib/postgresql/
  </code></pre>
  
  <p>Now that when i am trying to connect to postgresql it is giving me the following error.</p>
  
  <pre><code>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).
  </code></pre>
  
  <p>tried restarting postgresql server through command </p>
  
  <pre><code>/etc/init.d/postgresql restart 
  </code></pre>
  
  <p>but getting the same error.</p>
  
  <p>what shall i do?</p>