[ 
https://issues.apache.org/jira/browse/HDFS-9769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt LaMantia updated HDFS-9769:
--------------------------------
    Assignee: Matt LaMantia  (was: Daniel Templeton)

> Multiple tests use incorrect file permissions
> ---------------------------------------------
>
>                 Key: HDFS-9769
>                 URL: https://issues.apache.org/jira/browse/HDFS-9769
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.8.0
>            Reporter: Daniel Templeton
>            Assignee: Matt LaMantia
>
> The {{FsPermission.<init>(short)}} constructor takes the mode as an octal 
> short.  Setting a permission of a+rwx should therefore look like 
> {{FsPermission((short)0777)}}.  In several cases, the permissions are set 
> like {{FsPermission((short)777)}} instead, which actually would set the 
> permissions to u+r,g+x,o+x and turn on the sticky bit (777 = 01411).  The 
> error clearly doesn't cause the tests to fail, but it should be corrected 
> nonetheless.
> The tests with bad permissions are:
> # {{TestSecureNameNode.testName()}}
> # {{TestMover.testMoverWithStripedFile()}}
> # {{TestBalancer.testTwoReplicaShouldNotInSameDN()}}
> # {{TestAuditLogger.testAuditLoggerWithCallContext()}}
> # {{TestFSImage.testSaveAndLoadStripedINodeFile()}}
> The last one is particularly entertaining because it tries to set the 
> permissions in hex.
> This JIRA should also include making the {{FsPermission}} docs clearer so 
> that it's harder to make this mistake.



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

Reply via email to