Q:

Not able to list files inside a HDFS directory eventhough i have read access to directory

As per below command it clearly states that the user sp10 has read access to input_files directory which is inside /data/staged/advance/adobe/mail_segments/
Why is it the user sp10 not able to list all files inside /data/staged/advance/adobe/mail_segments/input_files  ?
sp10 is one of the users of group cldusers
 [sp10@client01 scripts]$ hdfs dfs -ls /data/staged/advance/adobe/mail_segments/
 Found 1 items
 drwxr-----   - appid cldusers          0 2017-06-12 11:12 /data/staged/advance/adobe/mail_segments/input_files

 [sp10@client01 scripts]$ hdfs dfs -ls /data/staged/advance/adobe/mail_segments/input_files
 ls: Permission denied: user=sp10, access=READ_EXECUTE, inode="/data/staged/advance/adobe/mail_segments/input_files":appid:cldusers:drwxr-----

 [sp10@client01 scripts]$ groups sp10
 sp10 : sp10 managers cldusers 

 [sp10@client01 scripts]$ groups appid
 appid : appid managers cldusers
 [sp10@client01 scripts]$

A:

The Apache Hadoop HDFS Permissions Guide includes a section on Permission Checks, which lists various file system operations and the exact permissions required on the paths.  The relevant operation in this case is getListing.  For the final component of the path, this operation requires both read and execute access.  For a user with only read access, it's insufficient, so access is denied.
I expect if you add execute access for the group on /data/staged/advance/adobe/mail_segments/input_files, then it will work the way you want.

