Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.2.40, 10.4.21
-
SUSE Linux Enterprise Server 15, SUSE Linux Enterprise Server 15 SP2
Description
mysql_install_db with umask 007 doesn't work work when datadir is a directory nested inside /var/lib/mysql. To test it, the datadir /var/lib/mysql/node1/databases has been used. mariadb@.service has UMask=007 and the service in SUSE Linux Enterprise Server runs mysql_install_db on the datadir set in the configuration file.
This can be translated to:
ExecStartPre=/usr/bin/mysql_install_db --datadir=/var/lib/mysql/node1/databases
The error in /var/log/mysql/mysqld.log is:
[ERROR] mysqld: Can't create/write to file '/var/lib/mysql/node1/databases/aria_log_control' (Errcode: 13 "Permission denied")
It stops half-way when it is creating the database. The same command outside of systemd works so the issue is umask.