command: "/usr/lib/postgresql/10/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/postgresql/10/main" -o "-p 50432 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000 -c config_file=/var/lib/postgresql/10/main/postgresql.conf --hba_file=/var/lib/postgresql/10/main/pg_hba.conf --ident_file=/var/lib/postgresql/10/main/pg_ident.conf -c listen_addresses='' -c unix_socket_permissions=0700" start >> "pg_upgrade_server.log" 2>&1 pg_ctl: another server might be running; trying to start server anyway waiting for server to start....2021-08-23 07:11:37.208 UTC [1385] FATAL: data directory "/var/lib/postgresql/10/main" has group or world access 2021-08-23 07:11:37.208 UTC [1385] DETAIL: Permissions should be u=rwx (0700). stopped waiting pg_ctl: could not start server Examine the log output.
关键的两行日志如下:
1 2 3
2021-08-2307:11:37.208 UTC [1385] FATAL: data directory "/var/lib/postgresql/10/main" has group or world access 2021-08-23 07:11:37.208 UTC [1385] DETAIL: Permissions should be u=rwx (0700). stopped waiting
搜索问题
使用 Google 搜索『data directory has group or world access』