mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 17:54:16 +01:00
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:*]
This commit is contained in:
parent
972879f413
commit
62dfd0c09d
1 changed files with 6 additions and 4 deletions
10
debian/mariadb-server-10.5.postinst
vendored
10
debian/mariadb-server-10.5.postinst
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue