postgres中的连接问题 [英] Connection issue in postgres

查看:95
本文介绍了postgres中的连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想要连接postgres数据库



任何帮助?

感谢期待



我尝试过:



naeem @ naeem-Inspiron-5520:/ var / www / html / eSecretarial $ sudo -u postgres psql

sudo:/ var / lib / sudo可由非所有者写入(040775),应该是模式0700

[ sudo]密码为naeem:

psql:致命:无法打开文件base / 12066/11868:权限被拒绝

naeem @ naeem-Inspiron-5520:/ var / www / html / eSecretarial $

解决方案

sudo -u postgres psql

sudo:/ var / lib / sudo可由非所有者写入(040775),应为模式0700

[sudo]密码为naeem:

psql:致命:无法打开文件base / 12066 / 11868:许可被拒绝

naeem @ naeem-Inspiron-5520:/ var / www / html / eSecretarial



< blockquote>你有两个与PostgreSQL无关的问题br />


 sudo:/ var / lib / sudo可由非所有者写入(040775),应为模式0700 



/ var / lib / sudo (甚至整个上层目录树)的权限已更改。这些必须恢复。如果已为 / var / lib 或甚至 / var 更改了它们,则会出现问题,因为您可能不知道必须为每个子目录设置哪些权限,文件。



如果您或具有超级用户权限的同事更改了权限:为什么?

如果没有,您的系统可能会受到损害。



在后一种情况下或当您更改了整个目录的权限时,您必须重新安装Linux发行版。


naeem的

 [sudo]密码:



您为用户执行了 sudo postgres 但系统会提示您输入用户 naeem 的密码。这是可疑的。



将对无权访问该文件的用户执行该命令。


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$

解决方案

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



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.


这篇关于postgres中的连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆