Suggestion.
Hadoop uses unix "whoami" utility to check users and enforce permissions. Make
sure your whoami is reporting correct user name (when you are changing from
user1 to user2 ).
Also make sure in configuration file hdfs-site.xml dfs.permission.enabled is
true. (by default it's set to true )
<property>
<name>dfs.permissions.enabled</name>
<value>true</value>
<description>
If "true", enable permission checking in HDFS.
If "false", permission checking is turned off,
but all other behavior is unchanged.
Switching from one parameter value to the other does not change the mode,
owner or group of files or directories.
</description>
</property>
Hope this helps.
-Ravi
On 12/17/09 4:22 AM, "Starry SHI" <[email protected]> wrote:
Hi.
I wonder how permission control can be used in HDFS?
I am using hadoop 0.20.1, and I have 3 user accessing to HDFS. I use user1's
account to create a file and chmod 600 to this file in HDFS. However, I
tried to use user2 and user3's account to access the file belonging to
user1, they can still read the contents of the file!!! This means the
permission control is no use in HDFS.
What I tried to do is to avoid user2 and user3 to read the file from user1
stored in HDFS. In the configuration I have already set dfs.permissions as
"true". Can somebody tell me how to enable permission control in HDFS?
Best regards,
Starry
/* Tomorrow is another day. So is today. */
Ravi
--