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

            juan.vera Juan created issue -

            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.
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Status Open [ 1 ] Confirmed [ 10101 ]
            elenst Elena Stepanova made changes -
            Assignee Sergei Golubchik [ serg ]
            elenst Elena Stepanova made changes -
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Anel Husakovic [ anel ]

            Let's treat it like a bug

            serg Sergei Golubchik added a comment - Let's treat it like a bug
            serg Sergei Golubchik made changes -
            Fix Version/s 5.5 [ 15800 ]
            Fix Version/s 10.0 [ 16000 ]
            Fix Version/s 10.1 [ 16100 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            julien.fritsch Julien Fritsch made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.4 [ 22408 ]
            serg Sergei Golubchik made changes -
            Assignee Anel Husakovic [ anel ] Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Status Confirmed [ 10101 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.1.39 [ 23305 ]
            Fix Version/s 10.2.24 [ 23308 ]
            Fix Version/s 10.3.15 [ 23309 ]
            Fix Version/s 10.4.5 [ 23311 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 5.5 [ 15800 ]
            Fix Version/s 10.0 [ 16000 ]
            Fix Version/s 10.1 [ 16100 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Component/s Scripts & Clients [ 11002 ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 90484 ] MariaDB v4 [ 155167 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 154291

            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.