Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgresql fatal error

Tags:

postgresql

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?

like image 637
Geek Avatar asked Sep 19 '13 07:09

Geek


People also ask

Can I install pgAdmin without PostgreSQL?

If you are installing pgAdmin without PostgreSQL, you can download pgAdmin from pgadmin.org. While on the site, you can opt to peruse one of the guides introducing pgAdmin. The tool is well-organized and, for the most part, guides itself quite well. Adventurous users can always try beta and alpha releases of pgAdmin.

How do I open pgAdmin in Chrome?

To open pgAdmin, select pgAdmin4 from the EDB Postgres menu. The client opens in your default browser. To connect to the Advanced Server database server, expand the Servers node of the Browser tree control, and right click on the EDB Postgres Advanced Server node. When the context menu opens, select Connect Server .


1 Answers

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.

like image 89
Chris Travers Avatar answered Oct 18 '22 21:10

Chris Travers