TT#45479 Ensure /run/fastcgi is owned by www-data + install file in usr/lib/tmpfiles.d/

On Debian/buster /run/fastcgi is owned by the user/group of the
service which uses the directory first.

ngcpcfg-api, running under root, is faster at startup than ngcp-panel,
so the directory /run/fastcgi (AKA /var/run/fastcgi) is owned by
root:root.

ngcp-panel is running under www-data:www-data though, so missing
permissions to create ngcp-panel.pid file and ngcp-panel.sock socket
file inside /run/fastcgi.

To ensure that /run/fastcgi is owned by www-data no matter which
service starts up first rely on systemd's tmpfiles.d approach.

While working on this, noticed that the file is installed inside
directory /usr/lib/tmpfiles.d/ngcp-panel.conf/, while it's supposed
to be named /usr/lib/tmpfiles.d/ngcp-panel.conf. Accordingly renamed
the file.

Thanks: Manuel Montecelo for the suggestion to use systemd's tmpfiles.d approach

Change-Id: I0677fec76620839f3e670d8da9d01a8b65ff3e73
(cherry picked from commit b65374e8ac)
changes/00/24100/1
Michael Prokop 7 years ago
parent 752175ec00
commit cb435676b6

@ -0,0 +1,3 @@
# shipped as /usr/lib/tmpfiles.d/ngcp-panel.conf
d /tmp/ngcp 0755 www-data www-data
d /run/fastcgi 0755 www-data www-data

@ -1,4 +1,4 @@
debian/ngcp-panel.tmpfiles.d.conf usr/lib/tmpfiles.d/ngcp-panel.conf
debian/ngcp-panel.conf usr/lib/tmpfiles.d/
lib/NGCP/Panel/I18N/* usr/share/perl5/NGCP/Panel/I18N
logging.conf etc/ngcp-panel/
ngcp_panel.conf etc/ngcp-panel/

@ -1 +0,0 @@
d /tmp/ngcp 0755 www-data www-data
Loading…
Cancel
Save