Topic: Cent OS 7 systemd service is missing RuntimeDirectory option
Hello,
On brand new Centos 7 install, fresh install of php74+fpm is deploying a systemd service that is missing RuntimeDirectory option :
File : system/php74-php-fpm.service
# It's not recommended to modify this file in-place, because it
# will be overwritten during upgrades. If you want to customize,
# the best way is to use the "systemctl edit" command.
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target
[Service]
Type=notify
EnvironmentFile=/etc/opt/remi/php74/sysconfig/php-fpm
ExecStart=/opt/remi/php74/root/usr/sbin/php-fpm --nodaemonize
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Compared to default Centos 7 PHP service :
# It's not recommended to modify this file in-place, because it
# will be overwritten during upgrades. If you want to customize,
# the best way is to use the "systemctl edit" command.
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target
[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/php-fpm
ExecStart=/usr/sbin/php-fpm --nodaemonize
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
RuntimeDirectory=php-fpm
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target
This is of course an issue because /var/run/php-fpm is then not present at service start.
Thanks
Gaëtan