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

filecontext mkdirs doesn't apply umask as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.23.3
    • 0.23.3, 2.0.2-alpha
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: