PostgreSQL 安装 权限问题求助
postgresql吧
全部回复
仅看楼主
level 4
code:
———————————————————————————————————————————
postgres@ubuntu:/usr/local/pgsql$ ls -l data/
total 92
drwx------ 5 postgres postgres 4096 Apr 6 20:54 base
drwx------ 2 postgres postgres 4096 Apr 6 20:54 global
drwx------ 2 postgres postgres 4096 Apr 6 20:54 pg_clog
-rw------- 1 postgres postgres 4476 Apr 6 20:54 pg_hba.conf
-rw------- 1 postgres postgres 1636 Apr 6 20:54 pg_ident.conf
drwx------ 4 postgres postgres 4096 Apr 6 20:54 pg_multixact
drwx------ 2 postgres postgres 4096 Apr 6 20:54 pg_notify
drwx------ 2 postgres postgres 4096 Apr 6 20:54 pg_serial
drwx------ 2 postgres postgres 4096 Apr 6 20:54 pg_snapshots
drwx------ 2 postgres postgres 4096 Apr 6 20:54 pg_stat
drwx------ 2 postgres postgres 4096 Apr 6 20:54 pg_stat_tmp
drwx------ 2 postgres postgres 4096 Apr 6 20:54 pg_subtrans
drwx------ 2 postgres postgres 4096 Apr 6 20:54 pg_tb
lsp
c
drwx------ 2 postgres postgres 4096 Apr 6 20:54 pg_twophase
-rw------- 1 postgres postgres 4 Apr 6 20:54 PG_VERSION
drwx------ 3 postgres postgres 4096 Apr 6 20:54 pg_xlog
-rw------- 1 postgres postgres 20543 Apr 6 20:54 postgresql.conf
postgres@ubuntu:/usr/local/pgsql$ ./bin/postgres -D data >logffile 2>&1 &
[1] 3379
postgres@ubuntu:/usr/local/pgsql$ -su: logffile: Permission denied
[1]+ Exit 1 ./bin/postgres -D data > logffile 2>&1
postgres@ubuntu:/usr/local/pgsql$ ./bin/postgres -D data >./data/logffile 2>&1 &~
[1] 3455
-su: /var/lib/postgresql: Is a directory
postgres@ubuntu:/usr/local/pgsql$
[1]+ Exit 1 ./bin/postgres -D data > ./data/logffile 2>&1
postgres@ubuntu:/usr/local/pgsql$
——————————————————————————————————————————————
创建data作为数据库的数据目录,,并使用initdb完成初始化。
postgres@ubuntu:/usr/local/pgsql$ ./bin/postgres -D data >logffile 2>&1 &
遇到该权限问题怎么解决???
求大神帮助~谢谢!
2017年04月06日 13点04分 1
level 4
小白求教
2017年04月06日 14点04分 2
level 4
[泪]
2017年04月07日 01点04分 3
level 1
/bin/sh: logfile: 权限不够
2020年02月25日 01点02分 4
level 1
-D 指定数据目录,再看一下安装目录与数据目录有没有postgres权限
2023年01月12日 02点01分 5
1