Commit 62dfd0c0 authored by Tuukka Pasanen's avatar Tuukka Pasanen Committed by Daniel Black

MDEV-33837: Workaround chown warnings

Blindly recursive chown is not way to do it.
This Workaround is not much better than just chown -R but
there is small adjustment just chown MariaDB statedir and logdir
then with find only chown those files that are not correctly
owned.

Fixes lintian warnings:
 * W: mariadb-server: recursive-privilege-change "chown -R" [postinst:*]
 * W: mariadb-server: recursive-privilege-change "chown -R" [postinst:*]
parent 972879f4
......@@ -128,10 +128,12 @@ EOF
# The mysql_statedir must not be writable by the mysql user under any
# circumstances as it contains scripts that are executed by root.
set +e
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
chmod 2750 $mysql_logdir
chown 0:0 "$mysql_statedir"
find "$mysql_statedir" ! -uid 0 -print0 | xargs -0 -r chown 0:0
find "$mysql_datadir" ! -uid "$(id -u mysql)" -print0 | xargs -0 -r chown mysql
chown mysql:adm "$mysql_logdir"
find "$mysql_logdir" -print0 | xargs -0 -r chown mysql:adm
chmod 2750 "$mysql_logdir"
set -e
## Set the correct filesystem ownership for the PAM v2 plugin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment