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

HttpFS (Hoop) chmod not supporting octal and sticky bit permissions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-alpha
    • 2.0.0-alpha
    • None
    • None
    • Reviewed

    Description

      HttpFs supports only the permissions: [0-7][0-7][0-7]

      In order to be compatible with webhdfs in needs to understand octal and sticky bit permissions (e.g. 0777, 01777...)

      Example of error:
      curl -L -X PUT "http://localhost:14000/webhdfs/v1/user/romain/test?permission=01777&op=SETPERMISSION&user.name=romain"
      {"RemoteException":{"message":"java.lang.IllegalArgumentException: Parameter [permission], invalid value [01777], value must be [default|(-[-r][-w][-x][-r][-w][-x][-r][-w][-x])|[0-7][0-7][0-7]]","exception":"QueryParamException","javaClassName":"com.sun.jersey.api.ParamException$QueryParamException"}}

      Works with WebHdfs:
      curl -L -X PUT "http://localhost:50070/webhdfs/v1/user/romain/test?permission=01777&op=SETPERMISSION&user.name=romain"
      echo $?
      0

      curl -L -X PUT "http://localhost:14000/webhdfs/v1/user/romain/test?permission=999999&op=SETPERMISSION&user.name=romain"
      {"RemoteException":

      {"message":"java.lang.IllegalArgumentException: Parameter [permission], invalid value [999999], value must be [default|(-[-r][-w][-x][-r][-w][-x][-r][-w][-x])|[0-7][0-7][0-7]]","exception":"QueryParamException","javaClassName":"com.sun.jersey.api.ParamException$QueryParamException"}

      }

      Attachments

        1. HDFS-3309.patch
          4 kB
          Alejandro Abdelnur
        2. HDFS-3309.patch
          4 kB
          Alejandro Abdelnur

        Activity

          People

            tucu00 Alejandro Abdelnur
            romainr Romain Rigaux
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: