[
https://issues.apache.org/jira/browse/HDFS-10276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15284293#comment-15284293
]
Yuanbo Liu commented on HDFS-10276:
-----------------------------------
[~cmccabe] Thanks for your comment.
When I did some research about {{FSPermissionChecker}}, I found a similar issue
[HDFS-5802|https://issues.apache.org/jira/browse/HDFS-5802] which would be
fixed on Hadoop-2.8, and this is the key code of the patch
{quote}
if (!inodes[i].isDirectory()) {
throw new AccessControlException(
e.getMessage() + " (Ancestor " + inodes[i].getFullPathName()
+ " is not a directory).");
}
{quote}
It throws {{AccessControlException}} with "Ancestor is not a dirtectory" rather
than {{ParentNotDirectoryException}}, not elegant but compatible.
So first I'm sorry for not investigating deeply to find this issue early.
Second, I also tested the scenario that you mentioned here
{quote}
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
{quote}
The scenario did not work as expected. So I will add a patch to fix it.
Any comment will be appreciated, thanks in advance.
> HDFS throws AccessControlException when checking for the existence of /a/b
> when /a is a file
> --------------------------------------------------------------------------------------------
>
> 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]