icinga-packaging icon indicating copy to clipboard operation
icinga-packaging copied to clipboard

/etc/icingaweb2 not writable by default since PHP 7.4 FPM

Open nilmerg opened this issue 3 years ago • 4 comments

A user on SLES 15 SP2 had the issue that /etc/icingaweb2 is not writable. That's because php fpm has ProtectSystem=full in its default systemd unit file since version 7.4.

We should check which of our supported distributions are also affected. For affected ones, we then should provide a custom unit file then. (Probably, if anyone has a better alternative, mention it here)

From: https://github.com/Icinga/icingaweb2/issues/4335 PHP Issue: https://bugs.php.net/bug.php?id=72510 PHP PR: https://github.com/php/php-src/commit/40c4d7f1820df1872a71ab07fd26da45a203e37f

nilmerg avatar May 17 '21 07:05 nilmerg

If required please do not provide a custom unit file, just use a drop-in file named icingaweb2.conf or similar setting ProtectSystem=true allowing write for /etc and also place it in the system path /usr/lib/systemd/system/ and not user path /etc/systemd/system like it was done with Icinga 2.

Advantage of the drop-in would be to only override the required values and not taking over responsibility for the service. Advantage of the system path would be, that admins can still override in the user path without requiring a specific file order.

dgoetz avatar May 17 '21 13:05 dgoetz

This applies to SLES only, and only by installing php-fpm manually. Our packages don't do that automatically, so I'm not keen on providing even a drop-in file.

I'll leave a note in the installation documentation for Icinga Web 2, but that's it for now.

nilmerg avatar Jun 17 '21 06:06 nilmerg

@nilmerg Is that something we should invest more time in, or is the current behaviour acceptable?

htriem avatar Sep 08 '21 15:09 htriem

Our packages don't do that automatically

says all. I reckon? :man_shrugging:

nilmerg avatar Sep 09 '21 05:09 nilmerg