Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
want to connect postgres database

any help ?
thanking in an anticipation

What I have tried:

naeem@naeem-Inspiron-5520:/var/www/html/eSecretarial$ sudo -u postgres psql
sudo: /var/lib/sudo writable by non-owner (040775), should be mode 0700
[sudo] password for naeem:
psql: FATAL: could not open file "base/12066/11868": Permission denied
naeem@naeem-Inspiron-5520:/var/www/html/eSecretarial$
Posted
Updated 17-Mar-16 1:01am
v3

1 solution

You have two problems that are not related to PostgreSQL.

sudo: /var/lib/sudo writable by non-owner (040775), should be mode 0700

The permissions of /var/lib/sudo (or even whole upper directory trees) has been changed. These must be restored. If they has been changed for /var/lib or even /var, you have a problem because you will probably not know which permissions has to be set for each sub directory and file.

If you or a colleague with root access has changed the permission: Why?
If not, your system may be compromised.

In the latter case or when you have changed the permissions of whole directories you have to reinstall your Linux distribution.

[sudo] password for naeem:

You executed sudo for the user postgres but you are prompted for the password of the user naeem. This is suspicious.

The command will be executed for that user which has no access to the file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900