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

UMASK and UMASK_DIR are modes, not umasks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 10.1.45, 10.2.32, 10.3.23, 10.4.13, 10.5.4
    • Fix Version/s: N/A
    • Component/s: Configuration
    • Labels:
      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

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              GeoffMontee Geoff Montee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration