天天看点

Linux下HGDB data目录权限要求为700,否则无法启动数据库

[[email protected] data]$ pg_basebackup -h 192.168.90.220 -p 5432 -U highgo -F p -P -x -R -D /home/hgdb/3.1.4/data -l highgobak20170718 40105819/40105819 kB (100%), 1/1 表空间 [[email protected] data]$ pg_ctl start 正在启动服务器进程 [[email protected] data]$ 2017-07-26 15:18:55.117 CST致命错误: 组或其他用户都可以访问数据目录 "/home/hgdb/3.1.4/data" 2017-07-26 15:18:55.117 CST详细信息: 权限应该为 u=rwx (0700).

[[email protected] data]$ cd .. [[email protected] 3.1.4]$ ll 总用量 136 drwxrwxr-x 2 highgo highgo 4096 7月 18 15:02 archive -rwxr-xr-x 1 highgo highgo 1095 6月 7 16:55 basebackup.sh drwxrwxr-x. 2 highgo highgo 4096 6月 7 15:12 bin drwxrwxr-x 19 highgo highgo 4096 7月 26 15:17 data ----pg_basebackup后目录权限默认为775 drwx------ 19 highgo highgo 4096 7月 18 16:55 data07182 drwx------ 19 highgo highgo 4096 7月 24 12:57 data.0726 drwxrwxr-x. 2 highgo highgo 4096 6月 7 15:12 doc -rwxrwxr-x. 1 highgo highgo 896 6月 7 15:12 finish drwxrwxr-x. 5 highgo highgo 4096 6月 7 15:12 hgdbadmin -rw-rw-r--. 1 highgo highgo 502 6月 7 15:12 hgdbAdmin-1496819551856.desktop -rwxrwxr-x. 1 highgo highgo 3709 6月 7 15:12 hgdb-se3.1.4-1 drwxrwxr-x. 4 highgo highgo 4096 6月 7 15:12 include drwxrwxr-x. 3 highgo highgo 4096 6月 7 15:11 jdk drwxrwxr-x. 4 highgo highgo 4096 6月 8 09:23 lib drwxrwxr-x. 2 highgo highgo 4096 6月 7 15:12 licenses -rwxrwxr-x. 1 highgo highgo 15610 6月 7 15:12 LocaleEnabledXdgDesktopIconScript.sh -rw------- 1 highgo highgo 20950 6月 7 16:55 postgresql_.conf -rw-r--r-- 1 root root 20951 7月 18 14:01 postgresql.conf drwxrwxr-x. 5 highgo highgo 4096 6月 7 15:12 share -rwxrwxr-x. 1 highgo highgo 156 5月 12 2015 uninstall drwxrwxr-x. 2 highgo highgo 4096 6月 7 15:12 Uninstaller [[email protected] 3.1.4]$ chmod -R 700 data ----按要求改为700后,启动正常 [[email protected] 3.1.4]$ pg_ctl start 正在启动服务器进程 [[email protected] 3.1.4]$ 2017-07-26 15:19:20.156 CST日志: 日志输出重定向到日志收集进程 2017-07-26 15:19:20.156 CST提示: 后续的日志输出将出现在目录 "hgdb_log"中.

[[email protected] 3.1.4]$

继续阅读