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

Colin Patrick McCabe commented on HDFS-10276:
---------------------------------------------

Thanks for this, [~yuanbo].  Sorry for the sometimes slow pace of reviews.

If I understand correctly, the approach taken in this path is to change HDFS to 
throw an exception stating that the parent path is not a directory, rather than 
throwing an AccessControlException.

So first of all, this sounds like an incompatible change.  That's OK-- it just 
means this should probably go into branch-3 (trunk) rather than branch-2.

Secondly, it seems like it would be better to make the modification inside 
{{FSPermissionChecker}}, rather than adding an external function.  After all, 
this is a general problem, which affects more than just listDir.  We also need 
to make sure that we are not giving away too much information about the 
filesystem.  For example, if the user asks for {{/a/b/c}}, but does not have 
permission to list {{/a}}, we should not complain about {{/a/b}} not being a 
directory since that reveals privileged information.

> Different results for exist call for file.ext/name
> --------------------------------------------------
>
>                 Key: HDFS-10276
>                 URL: https://issues.apache.org/jira/browse/HDFS-10276
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Kevin Cox
>            Assignee: Yuanbo Liu
>         Attachments: HDFS-10276.001.patch, HDFS-10276.002.patch, 
> HDFS-10276.003.patch, HDFS-10276.004.patch
>
>
> Given you have a file {{/file}} an existence check for the path 
> {{/file/whatever}} will give different responses for different 
> implementations of FileSystem.
> LocalFileSystem will return false while DistributedFileSystem will throw 
> {{org.apache.hadoop.security.AccessControlException: Permission denied: ..., 
> access=EXECUTE, ...}}



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