initdb:无法访问目录“ / data / postgresql / data”:权限被拒绝

时间:2019-06-03 08:12:43

标签: permissions postgresql-9.5 postgresql-initdb

执行命令时出现问题

initdb -D /data/postfresql/data -E UTF-8 -locale=en_US.UTF-8

在输入上述命令之前,我已经执行了下面列出的命令。

chown -R postgres:postgres /data/postgresql
chown -R postgres:postgres /usr/loacl/postgresql
chmod -R 700 /data/postgresql/*
su postgres
export LANG=en_US.UTF-8

请参考以下完整信息:

-----begin-----
could not change directory to "/root": Permission denied
The files belonging to this database system will be owned by user "postgres".
This user must also won the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The fault next search configuration will be set to "english".

Data page checks are disabled.

initdb:could not access directory "/data/postgresql/data": Permission denied.
-----end-----

我该怎么做才能解决此问题?谢谢!

0 个答案:

没有答案