Author Topic: php-fpm74 systemd warnings on extranneous lvalues  (Read 2639 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
php-fpm74 systemd warnings on extranneous lvalues
« on: January 29, 2021, 03:36:06 PM »
I recent installed php7.4 in the php selector

It seems to be working properly, however, the php-fpm74 unit file seems to contain a bunch of unrecognized

systemctl status shows :
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:31] Unknown lvalue 'ProtectKernelModules' in section 'Service'
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:38] Unknown lvalue 'ProtectKernelTunables' in section 'Service'
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:44] Unknown lvalue 'ProtectControlGroups' in section 'Service'
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:47] Unknown lvalue 'RestrictRealtime' in section 'Service'
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:54] Unknown lvalue 'RestrictNamespaces' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:31] Unknown lvalue 'ProtectKernelModules' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:38] Unknown lvalue 'ProtectKernelTunables' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:44] Unknown lvalue 'ProtectControlGroups' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:47] Unknown lvalue 'RestrictRealtime' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:54] Unknown lvalue 'RestrictNamespaces' in section 'Service'



# cat /usr/lib/systemd/system/php-fpm74.service |grep -v ^#

[Unit]
Description=The PHP FastCGI Process Manager
After=network.target

[Service]
Type=simple
PIDFile=/opt/alt/php-fpm74/usr/var/run/php-fpm.pid
ExecStart=/opt/alt/php-fpm74/usr/sbin/php-fpm --nodaemonize --fpm-config /opt/alt/php-fpm74/usr/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
ProtectSystem=full
PrivateDevices=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
RestrictNamespaces=true

[Install]
WantedBy=multi-user.target


As compared to the php-fpm73 unit file which does not contain all of those extra lvalues

[Unit]
Description=The PHP FastCGI Process Manager
After=network.target

[Service]
Type=simple
PIDFile=/opt/alt/php-fpm73/usr/var/run/php-fpm.pid
ExecStart=/opt/alt/php-fpm73/usr/sbin/php-fpm --nodaemonize --fpm-config /opt/alt/php-fpm73/usr/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target


I could probably copy the 7.3 unit file over 7.4 and tweak it, but like I said, php 7.4 is working