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

Kevin Cox commented on HDFS-10276:
----------------------------------

Oops, my mistake. That chmod should be 666 (non executable) which would cause 
the `cat` to throw the exception. The new log is below.

{code}
% hdfs --config starscream/hadoop dfs -put <(echo test) /test
2016-04-18 08:15:41,615 WARN  [main] util.NativeCodeLoader 
(NativeCodeLoader.java:<clinit>(62)) - Unable to load native-hadoop library for 
your platform... using builtin-java classes where applicable
hdfs --config starscream/hadoop dfs -put <(echo test) /test  2.72s user 0.18s 
system 128% cpu 2.269 total
% hdfs --config starscream/hadoop dfs -chmod 666 /test                   
2016-04-18 08:16:52,903 WARN  [main] util.NativeCodeLoader 
(NativeCodeLoader.java:<clinit>(62)) - Unable to load native-hadoop library for 
your platform... using builtin-java classes where applicable
hdfs --config starscream/hadoop dfs -chmod 666 /test  2.37s user 0.16s system 
182% cpu 1.390 total
% hdfs --config starscream/hadoop dfs -cat /test/bar
2016-04-18 08:16:55,743 WARN  [main] util.NativeCodeLoader 
(NativeCodeLoader.java:<clinit>(62)) - Unable to load native-hadoop library for 
your platform... using builtin-java classes where applicable
cat: Permission denied: user=foo, access=EXECUTE, 
inode="/test/bar":kevincox:supergroup:-rw-rw-rw-
HADOOP_USER_NAME=foo hdfs --config starscream/hadoop dfs -cat /test/bar  2.40s 
user 0.16s system 185% cpu 1.378 total
{code}

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

Reply via email to