/var/lib/postgres should be owned by user postgres and not by root
Task Info (Flyspray) | |
---|---|
Opened By | Riri (chicha) |
Task ID | 63573 |
Type | Bug Report |
Project | Arch Linux |
Category | Packages: Extra |
Version | None |
OS | All |
Opened | 2019-08-27 16:14:59 UTC |
Status | Assigned |
Assignee | Levente Polyak (anthraxx) |
Details
Description:
The postgresql package installs a directory '/var/lib/postgres/data' using a dedicated systemd-tmpfiles configuration file with the following settings :
d /var/lib/postgres/data 700 postgres postgres h /var/lib/postgres/data - - - - +C
systemd-tmpfile will set ownership to postgres only for the innermost directory '/var/lib/postgres/data' but the parent directory will be owned by root. This is an issue because '/var/lib/postgres' is also the HOME directory for user 'postgres' : such user cannot write psql or bash history files, vim swap files and so ...
I believe the file postgresql.tmpfiles from the package should be changed to :
d /var/lib/postgres 700 postgres postgres d /var/lib/postgres/data 700 postgres postgres h /var/lib/postgres/data - - - - +C
Additional info:
- package version(s): postgresql-11.5-1