hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Srinivas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1322) DistributedFileSystem.mkdirs(dir, dirPermission) doesn't set the permissions of created dir to dirPermission
Date Fri, 29 Jul 2011 19:14:09 GMT

    [ https://issues.apache.org/jira/browse/HDFS-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072984#comment-13072984
] 

Suresh Srinivas commented on HDFS-1322:
---------------------------------------

> DistributedFileSystem.mkdirs(dir, dirPermission) calls DFSClient.mkdirs(dir, dirPermission)
to create directory and then set permissions to (dirPermission & ~umask)
This is the intended behavior right!

Read http://linux.die.net/man/2/umask

The umask for HDFS is set in the configuration file. It is being applied as permission &
~umask correctly both by DFSClient#mkdirs() and DFSClient#create(...). Perhaps the documentation
of mkdirs() and create() should be changed to mention how umask is obtained from configuration
and applied to the permission that is passed by the user.

> DistributedFileSystem.mkdirs(dir, dirPermission) doesn't set the permissions of created
dir to dirPermission
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-1322
>                 URL: https://issues.apache.org/jira/browse/HDFS-1322
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ravi Gummadi
>            Assignee: Anwar Abdus-Samad
>              Labels: newbie
>         Attachments: HDFS-1322.patch
>
>
> DistributedFileSystem.mkdirs(dir, dirPermission) calls DFSClient.mkdirs(dir, dirPermission)
to create directory and then set permissions to (dirPermission & ~umask). Is this the
intended behaviour ? I expect it to set permissions of dir to dirPermission instead of doing
an AND with ~umask ---- similar to what 'chmod -m mode' does.
> The javadoc of DFSClient.mkdirs() says that the permissions of created dir will be set
to dirPermission, which is not done currently. This needs to be modified based on the actual
behaviour.
> This is not an issue in RawLocalFileSystem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message