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

DFSClient#mkdirs and DFSClient#primitiveMkdir should use default directory permission

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      If the caller does not supply a permission, DFSClient#mkdirs and DFSClient#primitiveMkdir will create a new directory with the default directory permission 00777 now, instead of 00666.

      Description

      These 2 DFSClient methods should use default directory permission to create a directory.

        public boolean mkdirs(String src, FsPermission permission,
            boolean createParent) throws IOException {
          if (permission == null) {
            permission = FsPermission.getDefault();
          }
      
        public boolean primitiveMkdir(String src, FsPermission absPermission, 
          boolean createParent)
          throws IOException {
          checkOpen();
          if (absPermission == null) {
            absPermission = 
              FsPermission.getDefault().applyUMask(dfsClientConf.uMask);
          } 
      

        Attachments

        1. HDFS-10650.001.patch
          5 kB
          John Zhuge
        2. HDFS-10650.002.patch
          5 kB
          John Zhuge

          Activity

            People

            • Assignee:
              jzhuge John Zhuge
              Reporter:
              jzhuge John Zhuge
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: