[
https://issues.apache.org/jira/browse/HADOOP-6897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409686#comment-16409686
]
Andras Bokor commented on HADOOP-6897:
--------------------------------------
It's still an issue. The patch seems valid. We cannot remove the static mkdirs
since it has different behavior than member ones.
It sets the permission without applying umask.
> FileSystem#mkdirs(FileSystem, Path, FsPermission) should not call
> setPermission if mkdirs failled
> -------------------------------------------------------------------------------------------------
>
> Key: HADOOP-6897
> URL: https://issues.apache.org/jira/browse/HADOOP-6897
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Priority: Major
> Attachments: mkdirs.patch
>
>
> Here is the piece of code that has the bug. fs.setPermission should not be
> called if result is false.
> {code}
> public static boolean mkdirs(FileSystem fs, Path dir, FsPermission
> permission)
> throws IOException {
> // create the directory using the default permission
> boolean result = fs.mkdirs(dir);
> // set its permission to be the supplied one
> fs.setPermission(dir, permission);
> return result;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]