hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuanbo Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-10276) HDFS throws AccessControlException when checking for the existence of /a/b when /a is a file
Date Mon, 16 May 2016 09:25:13 GMT

    [ 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
      if (!inodes[i].isDirectory()) {
        throw new AccessControlException(
            e.getMessage() + " (Ancestor " + inodes[i].getFullPathName()
                + " is not a directory).");
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
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
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,
> 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

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message