/var/lib/pgsql 0755
От | Justin Pryzby |
---|---|
Тема | /var/lib/pgsql 0755 |
Дата | |
Msg-id | 20210527180353.GC2082@telsasoft.com обсуждение исходный текст |
Ответы |
Re: /var/lib/pgsql 0755
|
Список | pgsql-pkg-yum |
Hi, Postgres requires that the data dir is restricted: 2021-05-27 13:39:44.002 EDT [23409] FATAL: data directory "/var/lib/pgsql/pgsql14.jtp" has invalid permissions 2021-05-27 13:39:44.002 EDT [23409] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750). But the server package creates /v/l/pgsql as mode 700, and rpm resets the perms on every installation. [pryzbyj@database ~]$ rpm -qvl postgresql14-server-14-beta1_3PGDG.rhel7.x86_64 |grep var/lib drwx------ 2 postgrespostgres 0 May 21 06:18 /var/lib/pgsql drwx------ 2 postgrespostgres 0 May 21 06:18 /var/lib/pgsql/14 drwx------ 2 postgrespostgres 0 May 21 06:18 /var/lib/pgsql/14/backups drwx------ 2 postgrespostgres 0 May 21 06:18 /var/lib/pgsql/14/data That seems unnecessarily restrictive, since I might put something like logs underneath there, and I'd prefer to be able to look for them, tab complete them, maybe even look *at* them, depending on log_file_mode, and the permissions that *I* set on the subdir. I might just want to "ls"/tab complete to know which version dir to use. In my deployment script, I go to the effort to set it back to 00755 for convenience. Maybe the mode 700 stuff is leftover from old packages which didn't include a version ? Either in the package name or as a subdir. There's not many base pakages which do this: rpm -qlav |grep '^drwx.*root *root' |grep -v ^drwxr-xr-x |awk -F/ '!/audit|firewall|tmp|lvm/ && NF<5' Would you consider setting at least /v/l/p to mode 755? And maybe the version subdirs (like 14) too. -- Justin
В списке pgsql-pkg-yum по дате отправления: