Hi Amar,

I just have tried.  Everything worked as expected.  I guess user A in your 
experiment was a superuser so that he could read anything.

Nicholas Sze

/////// permission testing //////////////////////////////////////////
drwx-wx-wx   - nicholas supergroup          0 2009-04-13 10:55 /temp
drwx-w--w-   - tsz supergroup          0 2009-04-13 10:58 /temp/test
-rw-r--r--   3 tsz supergroup       1366 2009-04-13 10:58 /temp/test/r.txt

//login as nicholas (non-superuser)

$ whoami
nicholas

$ ./bin/hadoop fs -lsr /temp
drwx-w--w-   - tsz supergroup          0 2009-04-13 10:58 /temp/test
lsr: could not get get listing for 'hdfs://xxxx:9000/temp/test' : 
org.apache.hadoop.security.AccessControlException: Permission denied: 
user=nicholas, access=READ_EXECUTE, inode="test":tsz:supergroup:rwx-w--w-

$ ./bin/hadoop fs -cat /temp/test/r.txt
cat: org.apache.hadoop.security.AccessControlException: Permission denied: 
user=nicholas, access=EXECUTE, inode="test":tsz:supergroup:rwx-w--w-



----- Original Message ----
> From: Amar Kamat <ama...@yahoo-inc.com>
> To: core-user@hadoop.apache.org
> Sent: Monday, April 13, 2009 2:02:24 AM
> Subject: Doubt regarding permissions
> 
> Hey, I tried the following :
> 
> -          created a dir temp for user A and permission 733
> 
> -          created a dir temp/test for user B and permission 722
> 
> -          - created a file temp/test/test.txt for user B and permission722
> 
> 
> 
> Now in HDFS, user A can list as well as read the contents of file
> temp/test/test.txt while on my RHEL box I cant. Is it a feature or a
> bug. Can someone please try this out and confirm?
> 
> 
> 
> Thanks
> 
> Amar

Reply via email to