[debian-mysql] Bug#948424: mariadb-server: set SELinux context when creating /var/lib/mysql

Christian Göttsche cgzones at googlemail.com
Wed Jan 8 14:29:45 GMT 2020


Please also for /var/log/mysql .

--- /root/workspace/mariadb-server-10.3.postinst        2020-01-08
15:27:11.254777947 +0100
+++ /var/lib/dpkg/info/mariadb-server-10.3.postinst     2020-01-08
15:28:14.101863225 +0100
@@ -85,6 +85,7 @@
     chown -R 0:0 $mysql_statedir
     find $mysql_datadir ! -uid "$(id -u mysql)" -print0 | xargs -0 -r
chown mysql
     chown -R mysql:adm $mysql_logdir
+    which restorecon >/dev/null 2>&1 && restorecon $mysql_logdir
     chmod 2750 $mysql_logdir
     set -e



More information about the pkg-mysql-maint mailing list