[ 
https://issues.apache.org/jira/browse/HDFS-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colin Patrick McCabe resolved HDFS-1322.
----------------------------------------

    Resolution: Invalid

As Suresh commented, this is working as designed.

If you don't want your permissions to be altered by the umask, you can set your 
client's umask to 0 using this code:
{code}
conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "0");
[... create FS using conf ...]
{code}

Try {{man umask}} for more information about umask.
                
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to