This following issue is remedied by
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, ...
HDFS-5802 may expose information about a path that user doesn't have permission to see.
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