FAQ
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. */

Search Discussions

  • Ravi Phulari at Dec 17, 2009 at 8:53 pm
    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" 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
    --
  • Starry SHI at Dec 18, 2009 at 6:17 am
    Hi Ravi.

    I have set dfs.permissions as true. But that problem still exist. Today I
    formatted the HDFS and restart Hadoop, and it is now working. It may be
    caused by inconsistent state of HDFS.

    Thank you very much for your help!

    Best regards,
    Starry

    /* Tomorrow is another day. So is today. */

    On Fri, Dec 18, 2009 at 04:51, Ravi Phulari wrote:

    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" 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
    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
categorieshadoop
postedDec 17, '09 at 12:23p
activeDec 18, '09 at 6:17a
posts3
users2
websitehadoop.apache.org...
irc#hadoop

2 users in discussion

Starry SHI: 2 posts Ravi Phulari: 1 post

People

Translate

site design / logo © 2022 Grokbase