level 4
响当当winner
楼主
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
———————————————————————————————————————————
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 &
遇到该权限问题怎么解决???
求大神帮助~谢谢!