[ 
https://issues.apache.org/jira/browse/HDFS-10689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15396129#comment-15396129
 ] 

Lei (Eddy) Xu commented on HDFS-10689:
--------------------------------------

Thanks for providing the patch, [~manojg]

* The changes on {{FsShellPermissions.java}}, {{UmaskParser.java}} and 
{{ChmodParser}} are not relevant? Lets remove them from the patch.
* {{PermissionParser.java#73}}, is it a format only change?
* In {{PermissionParser#applyOctalPattern}}:
{code}
stickyBitType = userType = groupType = othersType = '=';
{code}
Should we only set {{stickyBitType='='}}?
* {{TestStickyBit.java}}. Please clean up imports. 
{code}
// Tear down the test directories
402         hdfs.delete(sbExplicitTestDir, true);
403         hdfs.delete(sbOmittedTestDir, true);
404         assertFalse(hdfs.exists(sbExplicitTestDir));
405         assertFalse(hdfs.exists(sbOmittedTestDir));
{code}
You dont need to tear down these directories. Also you might not be necessary 
to test the sticky pit persistent by restart the cluster, as this is covered in 
the other test cases.

The rest looks good. Thanks


> "hdfs dfs -chmod 777" does not remove sticky bit
> ------------------------------------------------
>
>                 Key: HDFS-10689
>                 URL: https://issues.apache.org/jira/browse/HDFS-10689
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: fs
>            Reporter: Manoj Govindassamy
>            Assignee: Manoj Govindassamy
>            Priority: Minor
>         Attachments: HDFS-10689.001.patch
>
>
> When a directory permission is modified using hdfs dfs chmod command and when 
> octal/numeric format is used, the leading sticky bit is not fully honored.
> 1. Create a dir dir_test_with_sticky_bit
> 2. Apply sticky bit permission on the dir : hdfs dfs -chmod 1755 
> /dir_test_with_sticky_bit
> 3. Remove sticky bit permission on the dir: hdfs dfs -chmod 755 
> /dir_test_with_sticky_bit
> Expected: Remove the sticky bit on the dir, as it happens on Mac/Linux native 
> filesystem with native chmod.
> 4. However, removing sticky bit permission by explicitly turning off the bit 
> works. hdfs dfs -chmod 0755 /dir_test_with_sticky_bit
> {noformat}
> manoj@~/work/hadev-pp: hdfs dfs -chmod 1755 /dir_test_with_sticky_bit
> manoj@~/work/hadev-pp: hdfs dfs -ls /
> Found 2 items
> drwxr-xr-t   - manoj supergroup          0 2016-07-25 11:42 
> /dir_test_with_sticky_bit
> drwxr-xr-x   - manoj supergroup          0 2016-07-25 11:42 /user
> manoj@~/work/hadev-pp: hdfs dfs -chmod 755 /dir_test_with_sticky_bit
> manoj@~/work/hadev-pp: hdfs dfs -ls /
> Found 2 items
> drwxr-xr-t   - manoj supergroup          0 2016-07-25 11:42 
> /dir_test_with_sticky_bit  <=== sticky bit still intact
> drwxr-xr-x   - manoj supergroup          0 2016-07-25 11:42 /user
> manoj@~/work/hadev-pp: hdfs dfs -chmod 0755 /dir_test_with_sticky_bit
> manoj@~/work/hadev-pp: hdfs dfs -ls /
> Found 2 items
> drwxr-xr-x   - manoj supergroup          0 2016-07-25 11:42 
> /dir_test_with_sticky_bit
> drwxr-xr-x   - manoj supergroup          0 2016-07-25 11:42 /user
> manoj@~/work/hadev-pp: 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to