[
https://issues.apache.org/jira/browse/HDFS-4970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13703669#comment-13703669
]
Colin Patrick McCabe commented on HDFS-4970:
--------------------------------------------
bq. I'd be grateful if you moved it for me, otherwise I'll probably close it
and create a new hdfs issue.
I moved this to HDFS and updated the description to reflect the discussion.
> MiniDFSCluster#createPermissionsDiagnosisString should handle security
> exceptions in FileUtil#canRead and canWrite
> ------------------------------------------------------------------------------------------------------------------
>
> Key: HDFS-4970
> URL: https://issues.apache.org/jira/browse/HDFS-4970
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Mark Miller
> Priority: Minor
> Attachments: HADOOP-9699.patch
>
>
> Currently, if a security manager denies access on these calls, a
> SecurityException is thrown rather than returning false.
> This causes ugly behavior in MiniDFSCluster#createPermissionsDiagnosisString
> for example. If you are running with a security manager, that method can hide
> root exceptions on you because when it tries to create the permissions
> string, canRead and canWrite can throw security exceptions - the original
> exception is lost, and the problem may not be permissions related at all (it
> wasn't in the case that I ran into this).
> Rather than hardening createPermissionsDiagnosisString, it seems like these
> methods should just treat SecurityExceptions as lack of access.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira