Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-3890

filecontext mkdirs doesn't apply umask as expected

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical 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------.

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

        Issue Links

          Activity

          Thomas Graves created issue -
          Thomas Graves made changes -
          Field Original Value New Value
          Attachment HDFS-3890.patch [ 12543867 ]
          Thomas Graves made changes -
          Link This issue blocks MAPREDUCE-4633 [ MAPREDUCE-4633 ]
          Thomas Graves made changes -
          Attachment HDFS-3890.patch [ 12543896 ]
          Thomas Graves made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Target Version/s 0.23.3, 3.0.0, 2.2.0-alpha [ 12320052, 12320356, 12322472 ]
          Thomas Graves made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Thomas Graves made changes -
          Attachment HDFS-3890.patch [ 12543931 ]
          Thomas Graves made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Daryn Sharp made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags Reviewed [ 10343 ]
          Fix Version/s 0.23.3 [ 12320052 ]
          Fix Version/s 3.0.0 [ 12320356 ]
          Fix Version/s 2.2.0-alpha [ 12322472 ]
          Resolution Fixed [ 1 ]
          Arun C Murthy made changes -
          Fix Version/s 3.0.0 [ 12320356 ]
          Arun C Murthy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development