Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-3491

HttpFs does not set permissions correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.2-alpha
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      HttpFs seems to have these problems:

      1. can't set permissions to 777 at file creation or 1777 with setpermission
      2. does not accept 01777 permissions (which is valid in WebHdfs)

      WebHdfs
      curl -X PUT "http://localhost:50070/webhdfs/v1/tmp/test-perm-webhdfs?permission=1777&op=MKDIRS&user.name=hue&doas=hue"

      {"boolean":true}

      curl "http://localhost:50070/webhdfs/v1/tmp/test-perm-webhdfs?op=GETFILESTATUS&user.name=hue&doas=hue"
      {"FileStatus":{"accessTime":0,"blockSize":0,"group":"supergroup","length":0,"modificationTime":1338581075040,"owner":"hue","pathSuffix":"","permission":"1777","replication":0,"type":"DIRECTORY"}}

      curl -X PUT "http://localhost:50070/webhdfs/v1/tmp/test-perm-webhdfs?permission=01777&op=MKDIRS&user.name=hue&doas=hue"

      {"boolean":true}

      HttpFs
      curl -X PUT "http://localhost:14000/webhdfs/v1/tmp/test-perm-httpfs?permission=1777&op=MKDIRS&user.name=hue&doas=hue"

      {"boolean":true}

      curl "http://localhost:14000/webhdfs/v1/tmp/test-perm-httpfs?op=GETFILESTATUS&user.name=hue&doas=hue"
      {"FileStatus":{"pathSuffix":"","type":"DIRECTORY","length":0,"owner":"hue","group":"supergroup","permission":"755","accessTime":0,"modificationTime":1338580912205,"blockSize":0,"replication":0}}

      curl -X PUT "http://localhost:14000/webhdfs/v1/tmp/test-perm-httpfs?op=SETPERMISSION&PERMISSION=1777&user.name=hue&doas=hue"
      curl "http://localhost:14000/webhdfs/v1/tmp/test-perm-httpfs?op=GETFILESTATUS&user.name=hue&doas=hue"
      {"FileStatus":{"pathSuffix":"","type":"DIRECTORY","length":0,"owner":"hue","group":"supergroup","permission":"777","accessTime":0,"modificationTime":1338581075040,"blockSize":0,"replication":0}}

      curl -X PUT "http://localhost:14000/webhdfs/v1/tmp/test-perm-httpfs?permission=01777&op=MKDIRS&user.name=hue&doas=hue"
      {"RemoteException":{"message":"java.lang.IllegalArgumentException: Parameter [permission], invalid value [01777], value must be [default|[0-1]?[0-7][0-7][0-7]]","exception":"QueryParamException","javaClassName":"com.sun.jersey.api.ParamException$QueryParamException"}}

      1. HDFS-3491.patch
        10 kB
        Alejandro Abdelnur
      2. HDFS-3491.patch
        11 kB
        Alejandro Abdelnur
      3. HDFS-3491.patch
        11 kB
        Alejandro Abdelnur

        Issue Links

          Activity

          Arun C Murthy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Arun C Murthy made changes -
          Fix Version/s 2.0.2-alpha [ 12322472 ]
          Fix Version/s 2.1.0-alpha [ 12321440 ]
          Eli Collins made changes -
          Link This issue is related to HDFS-3903 [ HDFS-3903 ]
          Alejandro Abdelnur made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags Reviewed [ 10343 ]
          Fix Version/s 2.0.1-alpha [ 12321440 ]
          Resolution Fixed [ 1 ]
          Alejandro Abdelnur made changes -
          Attachment HDFS-3491.patch [ 12533916 ]
          Alejandro Abdelnur made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Alejandro Abdelnur made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Alejandro Abdelnur made changes -
          Attachment HDFS-3491.patch [ 12533339 ]
          Alejandro Abdelnur made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Alejandro Abdelnur made changes -
          Link This issue requires HDFS-3481 [ HDFS-3481 ]
          Alejandro Abdelnur made changes -
          Attachment HDFS-3491.patch [ 12530824 ]
          Alejandro Abdelnur made changes -
          Field Original Value New Value
          Assignee Alejandro Abdelnur [ tucu00 ]
          Romain Rigaux created issue -

            People

            • Assignee:
              Alejandro Abdelnur
              Reporter:
              Romain Rigaux
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development