Skip to content

Commit d53fa7f

Browse files
committed
Improve php-fpm systemd unit file
- use PrivateTmp, now available everwhere, for better security - add comment about how to customize the unit file
1 parent 0a4f89b commit d53fa7f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

sapi/fpm/php-fpm.service.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# It's not recommended to modify this file in-place, because it
2+
# will be overwritten during upgrades. If you want to customize,
3+
# the best way is to use the "systemctl edit" command.
4+
15
[Unit]
26
Description=The PHP FastCGI Process Manager
37
After=syslog.target network.target
@@ -7,6 +11,7 @@ Type=@php_fpm_systemd@
711
PIDFile=@localstatedir@/run/php-fpm.pid
812
ExecStart=@sbindir@/php-fpm --nodaemonize --fpm-config @sysconfdir@/php-fpm.conf
913
ExecReload=/bin/kill -USR2 $MAINPID
14+
PrivateTmp=true
1015

1116
[Install]
1217
WantedBy=multi-user.target

0 commit comments

Comments
 (0)