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

mysql_install_db break with umask 007 and nested datadir

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.2.40, 10.4.21
    • Fix Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
    • Component/s: Server
    • Labels:
      None
    • Environment:
      SUSE Linux Enterprise Server 15, SUSE Linux Enterprise Server 15 SP2

      Description

      mysql_install_db with umask 007 doesn't work work when datadir is a directory nested inside /var/lib/mysql. To test it, the datadir /var/lib/mysql/node1/databases has been used. mariadb@.service has UMask=007 and the service in SUSE Linux Enterprise Server runs mysql_install_db on the datadir set in the configuration file.

      This can be translated to:

      ExecStartPre=/usr/bin/mysql_install_db --datadir=/var/lib/mysql/node1/databases

      The error in /var/log/mysql/mysqld.log is:

      [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/node1/databases/aria_log_control' (Errcode: 13 "Permission denied")

      It stops half-way when it is creating the database. The same command outside of systemd works so the issue is umask.

        Attachments

          Activity

            People

            Assignee:
            danblack Daniel Black
            Reporter:
            danyspin97 Danilo Spinella
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration