bug#36462: mysql_install_db fails when run as user root and
root-directory not writable Rather than use the -w test, attempt the chown and bail out if it fails.
This commit is contained in:
parent
a25a3fb134
commit
2ca14303db
@ -358,9 +358,15 @@ do
|
||||
mkdir -p $dir
|
||||
chmod 700 $dir
|
||||
fi
|
||||
if test -w / -a ! -z "$user"
|
||||
if test -n "$user"
|
||||
then
|
||||
chown $user $dir
|
||||
if test $? -ne 0
|
||||
then
|
||||
echo "Cannot change ownership of the database directories to the '$user'"
|
||||
echo "user. Check that you have the necessary permissions and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user