Jake Low created HDFS-8422:
------------------------------
Summary: 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
`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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)