Details
Description
When mkdirs(Path) is called against LocalFileSystem, the implementation in RawLocalFileSystem is called and the directory permission is determined by the umask. However, if it is under ViewFileSystem, the default implementation in FileSystem is called and this causes explicit chmod() to 0777.
The mkdirs(Path) method needs to be overriden in
- ViewFileSystem to avoid calling the default implementation
- ChRootedFileSystem for proper resolution of viewfs mount table
- FilterFileSystem to avoid calling the default implementation
Only then the same method in the target (LocalFileSystem in this case) will be called. Hdfs does not suffer from the same flaw since it applies umask in all cases, regardless of what version of mkdirs() was called.
Attachments
Attachments
Issue Links
- causes
-
HADOOP-16963 HADOOP-16582 changed mkdirs() behavior
- Open
-
HIVE-23751 QTest: Override #mkdirs() method in ProxyFileSystem To Align After HADOOP-16582
- Closed
- relates to
-
HADOOP-18109 Ensure that default permissions of directories under internal ViewFS directories are the same as directories on target filesystems
- Resolved