Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17640

UMASK_DIR configuration for mysql_install_db is not applied to mysql database.

Details

    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 .
      

      Attachments

        Issue Links

          Activity

            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.

            elenst Elena Stepanova added a comment - 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.

            Let's treat it like a bug

            serg Sergei Golubchik added a comment - Let's treat it like a bug

            People

              serg Sergei Golubchik
              juan.vera Juan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.