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

Daryn Sharp commented on HADOOP-7327:
-------------------------------------

I checked an old path from months ago that I never submitted for FsShell.  I 
see that I was catching AccessControlExceptions to standardized the output 
format.  File access is throwing ACEs but I'm not sure whether dirs were too.  
It would stand to reason that both file and dir access should throw ACEs, which 
I think is consistent with NIO behavior?

That said, I'm only commenting/lamenting so my intention isn't to block this 
patch since a NPE will prematurely grind many FsShell commands to a halt.  For 
instance, "du" is worthless if just one dir in the tree is unreadable.  In many 
cases this patch is unquestionably better than nothing.

> FileSystem.listStatus() throws NullPointerException instead of IOException 
> upon access permission failure
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-7327
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7327
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.22.0, 0.23.0
>            Reporter: Matt Foley
>            Assignee: Matt Foley
>         Attachments: hadoop-7327-1.patch
>
>
> Many processes that call listStatus() expect to handle IOException, but 
> instead are getting runtime error NullPointerException, if the directory 
> being scanned is visible but no-access to the running user id.  For example, 
> if directory foo is drwxr-xr-x, and subdirectory foo/bar is drwx------, then 
> trying to do listStatus(Path(foo/bar)) will cause a NullPointerException.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to