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

UMASK and UMASK_DIR are modes, not umasks

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 10.1.45, 10.2.32, 10.3.23, 10.4.13, 10.5.4
    • N/A
    • Configuration
    • None

    Description

      MariaDB reads the UMASK and UMASK_DIR environment variables to determine what permissions to use when creating new files.

      However, these environment variables are not actually used as umasks. They are just used as regular file system permission modes.

      You can see the environment variables are read here:

      https://github.com/MariaDB/server/blob/mariadb-10.5.4/mysys/my_init.c#L83

      And then they are used as the mode argument when creating new files with open() here:

      https://github.com/MariaDB/server/blob/mariadb-10.5.4/mysys/my_open.c#L55

      This is pretty confusing behavior. If the environment variables have UMASK in the name, then shouldn't they be used as umasks? And if the environment variables are used as file system permission modes, then shouldn't the names reflect that?

      Attachments

        Issue Links

          Activity

            GeoffMontee Geoff Montee (Inactive) created issue -
            GeoffMontee Geoff Montee (Inactive) made changes -
            Field Original Value New Value

            Right, but what can we do about it? It was like this forever, for 20 years at least, and users rely on this behavior.

            serg Sergei Golubchik added a comment - Right, but what can we do about it? It was like this forever, for 20 years at least, and users rely on this behavior.
            serg Sergei Golubchik made changes -
            Fix Version/s N/A [ 14700 ]
            serg Sergei Golubchik made changes -
            Resolution Won't Fix [ 2 ]
            Status Open [ 1 ] Closed [ 6 ]
            Richard Richard Stracke made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 110719 ] MariaDB v4 [ 158042 ]

            People

              serg Sergei Golubchik
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.