Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3890

filecontext mkdirs doesn't apply umask as expected

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.23.3
    • Fix Version/s: 0.23.3, 2.0.2-alpha
    • Component/s: None
    • Labels:
      None

      Description

      I was attempting to set the umask of my fileContext and then do a mkdirs, but the umask wasn't applied as expected.

      doneDirFc = FileContext.getFileContext(doneDirPrefixPath.toUri(), conf);
      doneDirFc.setUMask(JobHistoryUtils.HISTORY_DONE_DIR_UMASK);
      doneDirFc.mkdir(path, fsp, true);

      It appears to be using the default umask set in the conf (fs.permissions.umask-mode) and overrode the umask I set in fileContext. I had the default umask set to 077 and set the filecontext umask to 007. The permissions on the directories it created were all rwx------.

        Attachments

        1. HDFS-3890.patch
          2 kB
          Thomas Graves
        2. HDFS-3890.patch
          12 kB
          Thomas Graves
        3. HDFS-3890.patch
          13 kB
          Thomas Graves

          Issue Links

            Activity

              People

              • Assignee:
                tgraves Thomas Graves
                Reporter:
                tgraves Thomas Graves
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: