Bug#927956: systemd-sysv: /var/run/postgresql is owned by root - postgres does not start after a reboot
Package: systemd-sysv Followup-For: Bug #927956 Dear Maintainer, This appears to have been fixed in 215-17+deb8u13 of the following packages Get:1 http://security.debian.org/ jessie/updates/main libudev1 amd64 215-17+deb8u13 [58.8 kB] Get:2 http://security.debian.org/ jessie/updates/main udev amd64 215-17+deb8u13 [878 kB] Get:3 http://security.debian.org/ jessie/updates/main libsystemd0 amd64 215-17+deb8u13 [90.5 kB] Get:4 http://security.debian.org/ jessie/updates/main libpam-systemd amd64 215-17+deb8u13 [127 kB] Get:5 http://security.debian.org/ jessie/updates/main systemd amd64 215-17+deb8u13 [2,555 kB] Get:6 http://security.debian.org/ jessie/updates/main systemd-sysv amd64 215-17+deb8u13 [37.5 kB] Get:7 http://security.debian.org/ jessie/updates/main libgudev-1.0-0 amd64 215-17+deb8u13 [43.5 kB] Obviously, people that have not updated those package and do a reboot, will need to either fix the permissions on /var/run/postgresql manually, or update those packages NB in my previous post I suggested that running sudo sh /usr/share/postgresql-common/init.d-functions would fix the ownership of /var/run/postgresql and that appears not to be the case, anyway. Sorry Regards -- 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+deb8u13 systemd-sysv recommends no packages. systemd-sysv suggests no packages. -- no debconf information
Bug#927956: systemd-sysv: /var/run/postgresql is owned by root - postgres does not start after a reboot
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