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

umask forced to 0640, should perhaps be 0127

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: None
    • Fix Version/s: N/A
    • Component/s: Scripts & Clients
    • Labels:
      None
    • Environment:
      linuxserver docker image

      Description

      server/scripts/mysqld_multi.sh, UMASK is forced to 0640 but perhaps it should be forced to 0127, so that the created files have a 0640 access:

       
      if (defined($ENV{UMASK})) {
        my $UMASK = $ENV{UMASK};
        my $m;
        my $fmode = "0640";
       
        if(($UMASK =~ m/[^0246]/) || ($UMASK =~ m/^[^0]/) || (length($UMASK) != 4)) {
          printf("UMASK must be a 3-digit mode with an additional leading 0 to indicate octal.\n");
          printf("The first digit will be corrected to 6, the others may be 0, 2, 4, or 6.\n"); }
        else {
          $fmode= substr $UMASK, 2, 2;
          $fmode= "06${fmode}"; }
       
        if($fmode != $UMASK) {
          printf("UMASK corrected from $UMASK to $fmode ...\n"); }
       
        $fmode= oct($fmode);
       
        umask($fmode);
      }
      

        Attachments

          Activity

            People

            Assignee:
            serg Sergei Golubchik
            Reporter:
            danieldeimert Daniel Deimert
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration