[
https://issues.apache.org/jira/browse/HDFS-10276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15248402#comment-15248402
]
Colin Patrick McCabe edited comment on HDFS-10276 at 4/19/16 6:49 PM:
----------------------------------------------------------------------
bq. Thanks a lot for your comment. I've reproduced this error and it should be
marked as a bug. I found that name node would check the access before checking
whether the file existed.
The NameNode needs to check access before checking whether the file exists.
Otherwise, unprivileged users could get information about files and directories
they should not have access to. In this specific case, though, we do want
exists to return false, since the user apparently does have permissions to find
out that the path doesn't exist.
was (Author: cmccabe):
bq. Thanks a lot for your comment. I've reproduced this error and it should be
marked as a bug. I found that name node would check the access before checking
whether the file existed.
The NameNode needs to check access before checking whether the file exists.
Otherwise, unprivileged users could get information about files and directories
they should not have access to. In this specific case, though, we do want
exists to return false, since the user apparently does have permissions to find
out that the file doesn't exist.
> 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
>
> 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)