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

mysql_install_db break with umask 007 and nested datadir

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.2.40, 10.4.21
    • 10.4, 10.5, 10.6
    • Server
    • 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

            Unassigned Unassigned
            danyspin97 Danilo Spinella
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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