[jira] [Commented] (HDFS-10689) "hdfs dfs -chmod 777" does not remove sticky bit

2016-07-27 Thread Manoj Govindassamy (JIRA)

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

Manoj Govindassamy commented on HDFS-10689:
---

Thanks for the inputs [~cnauroth]. 
[~andrew.wang], sure will change the summary and add a release notes. 

> "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
>Affects Versions: 2.6.4
>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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10689) "hdfs dfs -chmod 777" does not remove sticky bit

2016-07-27 Thread Chris Nauroth (JIRA)

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

Chris Nauroth commented on HDFS-10689:
--

bq. Now the question is if we declare this a bug fix that can be backported to 
branch-2, or if this behavior change is too incompatible. Given that sticky 
bits are pretty rare in general, I think it's safe for branch-2, but would 
welcome other's thoughts. Anything to add Chris Nauroth?

[~andrew.wang], thanks for the notification.  I agree with the proposed change, 
but the compatibility aspects of changes like this are always tricky to 
consider.  In this case, the change is something that potentially weakens 
authorization.  If a user has some automation that runs chmod on a directory, 
and that user expects the current behavior that sticky bit is preserved, then 
the effect would be to start allowing users to delete files owned by someone 
else.  Admittedly, sticky bit usage is rare, typically only on /tmp, but I'd 
still be more comfortable with this as a 3.x change flagged 
backward-incompatible.

> "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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10689) "hdfs dfs -chmod 777" does not remove sticky bit

2016-07-27 Thread Lei (Eddy) Xu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-10689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10689) "hdfs dfs -chmod 777" does not remove sticky bit

2016-07-27 Thread Wei-Chiu Chuang (JIRA)

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

Wei-Chiu Chuang commented on HDFS-10689:


The test failure was filed in HDFS-10696, and it was caused by HDFS-9937.

> "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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10689) "hdfs dfs -chmod 777" does not remove sticky bit

2016-07-27 Thread Manoj Govindassamy (JIRA)

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

Manoj Govindassamy commented on HDFS-10689:
---


TestHDFSCLI failure is not related to the patch. Latest trunk is seeing the 
same failure.

{noformat}
17699 2016-07-27 10:30:42,785 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(186)) -
17700 2016-07-27 10:30:42,785 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(190)) - Summary results:
17701 2016-07-27 10:30:42,785 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(191)) - --
17702 
17703 2016-07-27 10:30:42,785 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(211)) -Testing mode: test
17704 2016-07-27 10:30:42,785 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(212)) -
17705 2016-07-27 10:30:42,786 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(213)) -  Overall result: --- 
FAIL ---
17706 2016-07-27 10:30:42,786 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(221)) -# Tests pass: 665 
(99%)
17707 2016-07-27 10:30:42,786 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(223)) -# Tests fail: 1 (0%)
17708 2016-07-27 10:30:42,786 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(227)) -  # Validations done: 1726 
(each test may do mu  ltiple validations)
17709 2016-07-27 10:30:42,786 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(230)) -
17710 2016-07-27 10:30:42,786 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(231)) - Failing tests:
17711 2016-07-27 10:30:42,786 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(232)) - --17712 2016-07-27 
10:30:42,786 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(238)) - 595: help: help for dfsadmin 
clrSpaceQuota
17713 2016-07-27 10:30:42,787 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(248)) -17714 2016-07-27 10:30:42,787 [main] 
INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(249)) - Passing 
tests:
17715 2016-07-27 10:30:42,787 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(250)) - --
17716 2016-07-27 10:30:42,787 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(254)) - 1: ls: file using absolute path
17717 2016-07-27 10:30:42,787 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(254)) - 2: ls: file using relative path



17646 2016-07-27 10:45:22,083 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(177)) -  Comparator: 
[RegexpComparator]
17647 2016-07-27 10:45:22,083 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(179)) -  Comparision result:   [fail]
17648 2016-07-27 10:45:22,083 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(181)) - Expected output:   [^( 
|\t)*The storage ty  pe specific quota is cleared when -storageType option 
is specified.( )*]
17649 2016-07-27 10:45:22,083 [main] INFO  cli.CLITestHelper 
(CLITestHelper.java:displayResults(183)) -   Actual output:   
[-clrSpaceQuota [-stora  geType ] ...: Clear 
the space quota for each directory .
17650 For each directory, attempt to clear the quota. An error 
will be reported if
17651 1. the directory does not exist or is a file, or
17652 2. user is not an administrator.
17653 It does not fault if the directory has no quota.
17654 The storage type specific quota is cleared when 
-storageType option is specified.   Available storageTypes are
17655 - RAM_DISK
17656 - DISK
17657 - SSD
17658 - ARCHIVE

{noformat}





> "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 

[jira] [Commented] (HDFS-10689) "hdfs dfs -chmod 777" does not remove sticky bit

2016-07-26 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HDFS-10689:
--

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
20s{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 2 new or modified test 
files. {color} |
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  1m 
38s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  6m 
49s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  6m 
47s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  1m 
27s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  1m 
50s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
26s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  3m  
9s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m 
41s{color} | {color:green} trunk passed {color} |
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
14s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
29s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  7m  
4s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  7m  
4s{color} | {color:green} the patch passed {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
1m 33s{color} | {color:orange} root: The patch generated 11 new + 268 unchanged 
- 2 fixed = 279 total (was 270) {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  1m 
57s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
27s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  3m 
39s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m 
40s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  7m  
8s{color} | {color:green} hadoop-common in the patch passed. {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 58m  7s{color} 
| {color:red} hadoop-hdfs in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
23s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}108m 39s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | hadoop.cli.TestHDFSCLI |
\\
\\
|| Subsystem || Report/Notes ||
| Docker |  Image:yetus/hadoop:9560f25 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12820332/HDFS-10689.001.patch |
| JIRA Issue | HDFS-10689 |
| Optional Tests |  asflicense  compile  javac  javadoc  mvninstall  mvnsite  
unit  findbugs  checkstyle  |
| uname | Linux 8fc8ab6c6d25 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed 
Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/hadoop/patchprocess/precommit/personality/provided.sh 
|
| git revision | trunk / d84ab8a |
| Default Java | 1.8.0_101 |
| findbugs | v3.0.0 |
| checkstyle | 
https://builds.apache.org/job/PreCommit-HDFS-Build/16202/artifact/patchprocess/diff-checkstyle-root.txt
 |
| unit | 
https://builds.apache.org/job/PreCommit-HDFS-Build/16202/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HDFS-Build/16202/testReport/ |
| modules | C: hadoop-common-project/hadoop-common 
hadoop-hdfs-project/hadoop-hdfs U: . |
| 

[jira] [Commented] (HDFS-10689) "hdfs dfs -chmod 777" does not remove sticky bit

2016-07-26 Thread Andrew Wang (JIRA)

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

Andrew Wang commented on HDFS-10689:


Thanks for digging into this Manoj. I'm of the opinion that we should try to 
imitate the Linux/BSD behavior, since that'll be least surprising to end users.

Now the question is if we declare this a bug fix that can be backported to 
branch-2, or if this behavior change is too incompatible. Given that sticky 
bits are pretty rare in general, I think it's safe for branch-2, but would 
welcome other's thoughts. Anything to add [~cnauroth]?

> "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
>
> 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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10689) "hdfs dfs -chmod 777" does not remove sticky bit

2016-07-25 Thread Manoj Govindassamy (JIRA)

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

Manoj Govindassamy commented on HDFS-10689:
---

Whenever the leading bit in the numeric format is omitted, it is considered to 
be all 0s. Chmod man page clearly mentions on the expected behavior with 
permission apply via numeric option with respect to setuid and setgid bits. 

man chmod:
{noformat}
SETUID AND SETGID BITS
   chmod clears the set-group-ID bit of a regular file if the file’s group 
ID does not match the user’s effective group ID or one of  the  user’s  
supplementary  group
   IDs,  unless  the  user  has  appropriate privileges.  Additional 
restrictions may cause the set-user-ID and set-group-ID bits of MODE or RFILE 
to be ignored.  This
   behavior depends on the policy and functionality of the underlying chmod 
system call.  When in doubt, check the underlying system behavior.

   chmod preserves a directory’s set-user-ID and set-group-ID bits unless 
you explicitly specify otherwise.  *You can set or clear the bits with symbolic 
modes like u+s
   and g-s, and you can set (but not clear) the bits with a numeric mode.*
{noformat}

*That is, 755 will not reset setuid and setgid bits on the file/directory.* 
However, man page doesn't mention anything of that sort for sticky bits. So, I 
am leaning towards how other distros have implemented this. Here is the EXT4 
behavior.

{noformat}
-bash-4.1$ df -T
Filesystem Type  1K-blocks  Used Available Use% Mounted on
/dev/xvda1 ext4  103209948  91990624   5977880  94% /

-bash-4.1$ pwd
/home/manojg

drwxrwxr-x 2 manojg manojg 4096 Jul 25 19:09 dir_test_sticky_bit
-bash-4.1$ chmod 1775 dir_test_sticky_bit
-bash-4.1$ ls -l
total 4
drwxrwxr-t 2 manojg manojg 4096 Jul 25 19:09 dir_test_sticky_bit

-bash-4.1$ chmod 775 dir_test_sticky_bit
-bash-4.1$ ls -l
total 4
drwxrwxr-x 2 manojg manojg 4096 Jul 25 19:09 dir_test_sticky_bit  <=== 755 does 
clear out sticky bit
-bash-4.1$ .
{noformat}

So, EXT4 and many other filesystems on Linux, MacOSX are resetting Sticky Bit 
when the bit is not specified in the permission arg.


> "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
>
> 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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org