postgreSQLを先日、うちのMACに入れ、起動を試みています。
なんとか起動はできるものの、以下のような不自然なpermissionの自動変更がかかってしまいます。
解決策・心当たりなどご存知の方、いらっしゃれば,ご教示願います。
環境
OS:Mac Mojank 10.14.5
postgreSQL version : postgres (PostgreSQL) 11.4
bash
1 $ pg_ctl -D postgres start 2waiting for server to start....2019-08-10 14:17:40.834 JST [5285] LOG: listening on IPv6 address "::1", port 5432 32019-08-10 14:17:40.834 JST [5285] LOG: listening on IPv4 address "127.0.0.1", port 5432 42019-08-10 14:17:40.835 JST [5285] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 52019-08-10 14:17:40.848 JST [5286] LOG: database system was shut down at 2019-08-10 14:02:52 JST 62019-08-10 14:17:40.853 JST [5285] LOG: database system is ready to accept connections 7 done 8server started 9#起動に成功。 10$ pg_ctl -D postgres stop 11waiting for server to shut down....2019-08-10 14:17:51.244 JST [5285] LOG: received fast shutdown request 122019-08-10 14:17:51.246 JST [5285] LOG: aborting any active transactions 132019-08-10 14:17:51.246 JST [5285] LOG: background worker "logical replication launcher" (PID 5292) exited with exit code 1 142019-08-10 14:17:51.246 JST [5287] LOG: shutting down 152019-08-10 14:17:51.252 JST [5285] LOG: database system is shut down 16 done 17server stopped 18#一旦、終了 19#再起動を試みる。 20 $ pg_ctl -D postgres start 21waiting for server to start....2019-08-10 14:17:54.955 JST [5431] FATAL: data directory "/Users/user/Documents/Study/postgres" has invalid permissions 222019-08-10 14:17:54.955 JST [5431] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750). 23 stopped waiting #permissionエラーがでる。 24pg_ctl: could not start server 25Examine the log output. 26 27#起動の度にPermissionを変更する必要がある・・・。 28 $ chmod 700 postgres 29 30#再起動が失敗するpermissionが終了?起動?のたびに変わってしまっている。
以下は起動前/起動後のpermissionの情報
$ chmod 700 ./postgres $ ls -l drwx------ 25 usr staff 800 8 10 14:33 postgres #===postgresqlを起動=== # # #===postgresqlを終了=== $ ls -l drwxr-xr-x 25 usr staff 800 8 10 14:43 postgres
インストール方法については以下のコマンドを実行しました
bash
1brew install postgresql
初期設定については以下のようにしました。
bash
1initdb postgres
あなたの回答
tips
プレビュー