Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-5576

Maxctrl config permission check error message is misleading

    XMLWordPrintable

Details

    • MXS-SPRINT-232

    Description

      The error message that was reported when the maxctrl.cnf file had the wrong permissions was wrong. Read access is allowed for the group but the error instructed to remove all access from the group and the world.


      Title was: Expand permission check on maxctrl.cnf to maxscale group

      If user which executes

      "maxctrl -c"

      It is only be possible, if maxctrl.cnf have permission on user level.

      otherwise error is thrown

      Error: /tmp/maxctrl.cnf exists, but can be accessed by group and world. Remove all rights from everyone else but owner
      

      This is hard limited in the code:

      // As the file may contain a password, we are picky about the bits.
        if ((stats.mode & 31) != 0) {
          throw Error(
            "Error: " +
              filename +
              " exists, but can be accessed by group and world." +
              " Remove all rights from everyone else but owner"
          );
        }
      

      With expanding to maxscale group , it is secure enough and every user , which added to maxsacale group can access to maxctrl.cnf with "maxctrl -c"

      Error: /tmp/maxctrl.cnf exists, but can be accessed by group and world. Remove all rights from everyone else but owner
      

      Attachments

        Activity

          People

            markus makela markus makela
            Richard Richard Stracke
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.