[MDEV-26524] mysql_install_db break with umask 007 and nested datadir Created: 2021-09-02 Updated: 2023-09-19 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.2.40, 10.4.21 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Danilo Spinella | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | Papercut | ||
| Environment: |
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. |