Package: php7.4-fpm Version: 7.4.28-1+deb11u1 Severity: normal File: /etc/init.d/php7.4-fpm Tags: patch X-Debbugs-Cc: j...@nahmias.net
Hello, I've noticed that the php7.4-fpm package doesn't create the generic socket file /run/php/php-fpm.sock (managed by alternatives) when using sysvinit. It seems this was rolled into the systemd service unit file, but wasn't added to the sysvinit script. Here's a patch that adds it (along with an related bugfix for the permissions of the /run/php directory): --- /etc/init.d/php7.4-fpm.orig 2021-10-23 21:53:50.000000000 +0000 +++ /etc/init.d/php7.4-fpm 2022-03-30 02:31:05.339118410 +0000 @@ -49,6 +49,7 @@ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS 2>/dev/null \ || return 2 + /usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend # on this one. As a last resort, sleep for some time. @@ -77,6 +78,7 @@ [ "$?" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. rm -f $PIDFILE + /usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 return "$RETVAL" } @@ -96,7 +98,7 @@ case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - mkdir --mode=07500 /run/php + mkdir --parents --mode=0755 /run/php chown www-data:www-data /run/php case "$?" in 0) -- System Information: Debian Release: 11.2 APT prefers stable APT policy: (990, 'stable'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug') Architecture: i386 (i686) Kernel: Linux 5.10.0-10-686-pae (SMP w/1 CPU thread) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) LSM: AppArmor: enabled Versions of packages php7.4-fpm depends on: ii libacl1 2.2.53-10 ii libapparmor1 2.13.6-10 ii libargon2-1 0~20171227-0.2 ii libc6 2.31-13+deb11u2 ii libmagic1 1:5.39-3 ii libpcre2-8-0 10.36-2 ii libsodium23 1.0.18-1 ii libssl1.1 1.1.1k-1+deb11u1 ii libsystemd0 247.3-6 ii libxml2 2.9.10+dfsg-6.7 ii mime-support 3.66 ii php7.4-cli 7.4.28-1+deb11u1 ii php7.4-common 7.4.28-1+deb11u1 ii php7.4-json 7.4.28-1+deb11u1 ii php7.4-opcache 7.4.28-1+deb11u1 ii procps 2:3.3.17-5 ii tzdata 2021a-1+deb11u2 ii ucf 3.0043 ii zlib1g 1:1.2.11.dfsg-2 php7.4-fpm recommends no packages. Versions of packages php7.4-fpm suggests: pn php-pear <none> Versions of packages php7.4-common depends on: ii libc6 2.31-13+deb11u2 ii libffi7 3.3-6 ii libssl1.1 1.1.1k-1+deb11u1 ii php-common 2:76 ii ucf 3.0043 -- no debconf information