Bug#927956: systemd-sysv: /var/run/postgresql is owned by root - postgres does not start after a reboot
Dominic Mason
dommason at yahoo.com
Thu Apr 25 13:51:01 BST 2019
Package: systemd-sysv
Version: 215-17+deb8u12
Severity: important
Dear Maintainer,
Today I did an an apt-get update / upgrade on Jessie for these packages
Get:9 http://security.debian.org/ jessie/updates/main libsystemd0 amd64
215-17+deb8u12 [90.4 kB]
Get:10 http://security.debian.org/ jessie/updates/main libpam-systemd amd64
215-17+deb8u12 [127 kB]
Get:11 http://security.debian.org/ jessie/updates/main systemd amd64
215-17+deb8u12 [2,554 kB]
Get:12 http://security.debian.org/ jessie/updates/main systemd-sysv amd64
215-17+deb8u12 [37.4 kB]
This results - after a reboot - in postgres being unable to start as
/var/run/postgresql is owned by root:root not postgres:postgres
2019-04-25 12:34:20.758 BST [1372] FATAL: could not create lock file
"/var/run/postgresql/.s.PGSQL.5432.lock": Permission denied
2019-04-25 12:34:20.758 BST [1372] LOG: database system is shut down
pg_ctl: could not start server
* What exactly did you do that was effective
sudo chown postgres:postgres /var/run/postgresql
sudo systemctl start postgres
OR
sudo sh /usr/share/postgresql-common/init.d-functions
The above script is referenced in
/etc/init.d/postgresql
and has a section that checks for and sets the ownership of /var/run/postgresql
correctly.
The update to the various systemd packages seems not to run that script
Result - until you manually fix the permissions of /var/run/postgresql
postgresql does not start after a reboot.
-- System Information:
Debian Release: 8.11
APT prefers oldstable
APT policy: (500, 'oldstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-8-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages systemd-sysv depends on:
ii systemd 215-17+deb8u12
systemd-sysv recommends no packages.
systemd-sysv suggests no packages.
-- no debconf information
More information about the Pkg-systemd-maintainers
mailing list