[MDEV-17640] UMASK_DIR configuration for mysql_install_db is not applied to mysql database. Created: 2018-11-07  Updated: 2020-08-25  Resolved: 2019-04-25

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Scripts & Clients
Affects Version/s: 10.3.10
Fix Version/s: 10.2.24, 10.1.39, 10.3.15, 10.4.5

Type: Bug Priority: Major
Reporter: Juan Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

CentOS


Issue Links:
Relates
relates to MDEV-15844 Add umask and umask_dir as server var... Needs Feedback
relates to MDEV-17637 New systemd-aware script to re-create... Closed

 Description   

When creating databases and directories by manually invoking mysql_install_db after installing the server and adding a UMASK_DIR environment variable by running the following commands:

UMASK_DIR=0750
export UMASK_DIR
mysql_install_db

the mask is not applied to the mysql database directory:

~# ls -alrth /var/lib/mariadb/
total 109M
drwxr-xr-x. 25 root root 4.0K Nov 7 12:53 ..
-rw-rw---- 1 root root 48M Nov 7 12:53 ib_logfile1
drwx------ 2 root root 4.0K Nov 7 12:53 mysql
drwxr-x--- 2 root root 20 Nov 7 12:53 performance_schema
drwxr-x--- 2 root root 20 Nov 7 12:53 test
-rw-rw---- 1 root root 972 Nov 7 12:53 ib_buffer_pool
-rw-rw---- 1 root root 48M Nov 7 12:53 ib_logfile0
-rw-rw---- 1 root root 12M Nov 7 12:53 ibdata1
-rw-rw---- 1 root root 52 Nov 7 12:53 aria_log_control
-rw-rw---- 1 root root 16K Nov 7 12:53 aria_log.00000001
drwx------ 5 root root 181 Nov 7 12:53 .



 Comments   
Comment by Elena Stepanova [ 2018-11-07 ]

I don't think we claim anywhere in documentation that mysql_install_db (or any binaries or scripts other than mysqld and mysqld_safe) use UMASK_DIR variable. However, it does sound like a valid request. The script can very well be made aware of an environment variable, and if we choose on legacy reason to create mysql directory within the script, it should obey the same rules as the rest of the datadir.

Assigning to serg to decide whether it should be treated as a bug or a feature request, since the procedures are essentially different.

Comment by Sergei Golubchik [ 2018-11-11 ]

Let's treat it like a bug

Generated at Thu Feb 08 08:37:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.