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

umask-mode does not support 4-digit umask value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.0.0-alpha1
    • None
    • hdfs-client
    • None

    Description

      Best practice for specifying file permissions using the legacy octal format is to always add a leading "0" to ensure the value is treated as octal. However the fs.permissions.umask-mode parsing code throws an error when given a 4-digit string:

      $ hdfs dfs -Dfs.permissions.umask-mode=0000 -touchz foo.txt
      2013-01-24 12:49:02,352 WARN  permission.FsPermission (FsPermission.java:getUMask(245)) - Unable to parse configuration fs.permissions.umask-mode with value 0000 as octal or symbolic umask.
      -touchz: Unable to parse configuration fs.permissions.umask-mode with value 0000 as octal or symbolic umask.
      Usage: hadoop fs [generic options] -touchz <path> ...
      

      There's no downside to supporting 0000, so hdfs should handle it gracefully.

      Attachments

        1. HDFS-4439.patch
          2 kB
          Chu Tong

        Issue Links

          Activity

            People

              stayhf Chu Tong
              adi2 Andy Isaacson
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: