Bug#923032: php7.3-fpm: needs to set the SE Linux context after creating a directory
Control: user selinux-de...@lists.alioth.debian.org Control: usertags -1 selinux Or one could directly create the directory with the correct SELinux context: --- php-fpm.init.backup 2020-02-19 19:56:30.837758877 +0100 +++ php-fpm.init2020-02-19 19:56:47.137485779 +0100 @@ -103,7 +103,7 @@ if [ -r "$TMPFILES" ]; then while read type path mode user group age argument; do if [ "$type" = "d" ]; then - mkdir $V -p "$path" + mkdir $V -pZ "$path" chmod $V "$mode" "$path" chown $V "$user:$group" "$path" fi
Bug#923032: php7.3-fpm: needs to set the SE Linux context after creating a directory
Package: php7.3-fpm Version: 7.3.2-3 Severity: normal Tags: patch If restorecon exists it will label the directory if SE Linux is running or do nothing otherwise. With this change (which has already been done for many other daemons) the correct label will be applied if SE Linux is running. --- /etc/init.d/php7.3-fpm.orig 2019-02-23 08:53:37.748347859 + +++ /etc/init.d/php7.3-fpm 2019-02-23 09:46:25.137734597 + @@ -106,6 +106,7 @@ mkdir $V -p "$path" chmod $V "$mode" "$path" chown $V "$user:$group" "$path" + [ -x /sbin/restorecon ] && /sbin/restorecon "$path" fi done < "$TMPFILES" fi