English 中文(简体)
posgres 无法访问服务器配置文件: 权限被拒绝
原标题:postgres cannot access the server configuration file: Permission denied

这让我感到困惑(试图在MacOS狮子上设置后印格):

delirium:$ sudo ls -al /usr/local/pgsql/data/
total 64
drwx------  15 postgres  postgres    510 25 May 10:36 .
drwxr-xr-x@ 13 103       103         442 25 May 10:35 ..
-rw-------   1 postgres  postgres      4 25 May 10:36 PG_VERSION
drwx------   5 postgres  postgres    170 25 May 10:36 base
drwx------  41 postgres  postgres   1394 25 May 10:36 global
drwx------   3 postgres  postgres    102 25 May 10:36 pg_clog
-rw-------   1 postgres  postgres   3652 25 May 10:36 pg_hba.conf
-rw-------   1 postgres  postgres   1631 25 May 10:36 pg_ident.conf
drwx------   4 postgres  postgres    136 25 May 10:36 pg_multixact
drwx------   2 postgres  postgres     68 25 May 10:36 pg_stat_tmp
drwx------   3 postgres  postgres    102 25 May 10:36 pg_subtrans
drwx------   2 postgres  postgres     68 25 May 10:36 pg_tblspc
drwx------   2 postgres  postgres     68 25 May 10:36 pg_twophase
drwx------   4 postgres  postgres    136 25 May 10:36 pg_xlog
-rwxr-xr-x   1 postgres  postgres  16879 25 May 10:36 postgresql.conf
delirium:$ /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
postgres cannot access the server configuration file "/usr/local/pgsql/data/postgresql.conf": Permission denied

输出是否显示后gres 是 < code> posgresql.conf 的 < number > 拥有者 ? 为何不能访问文件?

我能怎么办?

最佳回答

诊断许可被拒错误的最快方法是登录( su sudo )作为该用户,并尝试 cat 文件。

如果此权限被拒绝, 没有找到文件, 我猜邮后gres 用户没有在父目录中获得执行权限, 可能是 3 : / usr/ local/ pgsql/ 中的任何一项 。

问题回答
sudo -u postgres /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data

...假设在默认用户 < code> posgres 设置后盖格时,则使用默认用户 < code> posgres





相关问题
摘录数据

我如何将Excel板的数据输入我的Django应用? I m将PosgreSQL数据库作为数据库。

Postgres dump of only parts of tables for a dev snapshot

On production our database is a few hundred gigabytes in size. For development and testing, we need to create snapshots of this database that are functionally equivalent, but which are only 10 or 20 ...

How to join attributes in sql select statement?

I want to join few attributes in select statement as one for example select id, (name + + surname + + age) as info from users this doesn t work, how to do it? I m using postgreSQL.

What text encoding to use?

I need to setup my PostgreSQL DB s text encoding to handle non-American English characters that you d find showing up in languages such as German, Spanish, and French. What character encoding should ...

SQL LIKE condition to check for integer?

I am using a set of SQL LIKE conditions to go through the alphabet and list all items beginning with the appropriate letter, e.g. to get all books where the title starts with the letter "A": SELECT * ...

热门标签