Commit 3a6e781e authored by Otto Kekäläinen's avatar Otto Kekäläinen

MDEV-9165: Run chown much faster on the datadir during install/update

parent 618edd40
......@@ -119,7 +119,7 @@ EOF
# circumstances as it contains scripts that are executed by root.
set +e
chown -R 0:0 $mysql_statedir
chown -R mysql $mysql_datadir
find $mysql_datadir ! -uid $(id -u mysql) -print0 | xargs -0 -r chown mysql
chown -R mysql:adm $mysql_logdir
chmod 2750 $mysql_logdir
set -e
......
......@@ -199,7 +199,7 @@ fi
# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is
# not chgrp'able (#318435).
set +e
chown mysql:mysql $mysql_datadir
find $mysql_datadir ! -uid $(id -u mysql) -print0 | xargs -0 -r chown mysql
find $mysql_datadir -follow -not -group mysql -print0 2>/dev/null \
| xargs -0 --no-run-if-empty chgrp mysql
set -e
......
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