You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Jake Low (JIRA)" <ji...@apache.org> on 2015/05/18 22:52:00 UTC

[jira] [Updated] (HDFS-8422) Recursive mkdir removes sticky bit when adding implicit u+wx to intermediate directories

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

Jake Low updated HDFS-8422:
---------------------------
    Description: 
When performing a recursive {{mkdirs}} operation, the NameNode takes the provided {{FsPermission}} and applies it to the final directory that is created. The NameNode also uses these permissions when creating intermediate directories, except it promotes with {{u+wx}} (i.e. {{mode |= 0300}}) in order to ensure that there are sufficient permissions on the new directory to create further subdirectories within it.

Currently the code that does this permission promotion uses the three-argument {{FsPermission}} constructor, which sets the sticky bit to {{false}}. I think this is probably not the intended behaviour, so I'm opening a bug. I'll attach a patch shortly that changes the behaviour so that the sticky bit is always retained.

  was:
When performing a recursive `mkdirs` operation, the NameNode takes the provided `FsPermission` and applies it to the final directory that is created. The NameNode also uses these permissions when creating intermediate directories, except it promotes with `u+wx` (i.e. `mode |= 0300`) in order to ensure that there are sufficient permissions on the new directory to create further subdirectories within it.

Currently the code that does this permission promotion uses the three-argument `Permission` constructor, which sets the sticky bit to `false`. I think this is probably not the intended behaviour, so I'm opening a bug. I'll attach a patch shortly that changes the behaviour so that the sticky bit is always retained.


> Recursive mkdir removes sticky bit when adding implicit u+wx to intermediate directories
> ----------------------------------------------------------------------------------------
>
>                 Key: HDFS-8422
>                 URL: https://issues.apache.org/jira/browse/HDFS-8422
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.7.0
>            Reporter: Jake Low
>            Assignee: Jake Low
>            Priority: Minor
>
> When performing a recursive {{mkdirs}} operation, the NameNode takes the provided {{FsPermission}} and applies it to the final directory that is created. The NameNode also uses these permissions when creating intermediate directories, except it promotes with {{u+wx}} (i.e. {{mode |= 0300}}) in order to ensure that there are sufficient permissions on the new directory to create further subdirectories within it.
> Currently the code that does this permission promotion uses the three-argument {{FsPermission}} constructor, which sets the sticky bit to {{false}}. I think this is probably not the intended behaviour, so I'm opening a bug. I'll attach a patch shortly that changes the behaviour so that the sticky bit is always retained.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)