ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shantanu Mundkur (JIRA)" <>
Subject [jira] [Created] (AMBARI-11351) HdfsResource does not account for sticky bit
Date Fri, 22 May 2015 20:37:17 GMT
Shantanu Mundkur created AMBARI-11351:

             Summary: HdfsResource does not account for sticky bit
                 Key: AMBARI-11351
             Project: Ambari
          Issue Type: Bug
          Components: contrib
    Affects Versions: Ambari-2.1
         Environment: Linux
            Reporter: Shantanu Mundkur
            Assignee: Shantanu Mundkur
             Fix For: Ambari-2.1

Specifying a mode of 01777 will result in an exception like:

Exception in thread "main" java.lang.IllegalArgumentException: 1777
at org.apache.hadoop.fs.permission.PermissionParser.<init>(
at org.apache.hadoop.fs.permission.UmaskParser.<init>(
at org.apache.hadoop.fs.permission.FsPermission.<init>(
at org.apache.ambari.fast_hdfs_resource.Resource.setMode(
at org.apache.ambari.fast_hdfs_resource.Runner.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.hadoop.util.RunJar.main(

In fast_hdfs_resource, setMode is used to set the permissions on the Resource object using
the specified mode. Passing in the mode as a string for FsPermission is what results in the
problem because the constructor that is used with string as argument uses the UmaskParser.
Umask values are slightly different from standard modes as they cannot specify t (sticky bit)
or X.

Passing in the argument as a short is probably what is needed here to enable using the FsPermission
code that accounts for the sticky bit.

This message was sent by Atlassian JIRA

View raw message