Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
2.7.3
-
None
-
None
Description
Currently FileSystem's static mkdirs(FileSystem fs, Path dir, FsPermission permission) creates the directory in a two step operation
// create the directory using the default permission boolean result = fs.mkdirs(dir); // set its permission to be the supplied one fs.setPermission(dir, permission);
this isn't atomic and creates a risk of race/security conditions. This code is used in production
Better to simply forward to mkdirs(path, permissions).
is there any reason to not do that?
Attachments
Attachments
Issue Links
- relates to
-
HADOOP-1873 User permissions for Map/Reduce
- Closed