[ 
https://issues.apache.org/jira/browse/HADOOP-6962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461313#comment-13461313
 ] 

Harsh J commented on HADOOP-6962:
---------------------------------

What is the resolution here?

The DistributedFileSystem#mkdirs (which is the func. that allows parent-dir 
creation):

{code}
 @Override
  public boolean mkdirs(Path f, FsPermission permission) throws IOException {
    statistics.incrementWriteOps(1);
    return dfs.mkdirs(getPathName(f), permission, true);
  }
{code}

Eventually reaches the FSDirectory#mkdirs call with the inheritPermission 
argument set to false, thereby making it use the supplied permission object 
itself as the parent permission object:

{code}
// default to creating parent dirs with the given perms
      PermissionStatus parentPermissions = permissions;
<And eventually similar after entering a condition if there's parent 
directories to make>
{code}

So this mkdirs(…) at the client (FS.mkdirs(P, Perm) as the title goes) is 
already supporting parent dir permission setting, no? Only LocalFS doesn't 
implement it that way. Given that, must we be changing anything at all?

I may be wrong somewhere here, feel free to point out.
                
> FileSystem.mkdirs(Path, FSPermission) should use the permission for all of 
> the created directories
> --------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6962
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6962
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>            Reporter: Owen O'Malley
>            Assignee: Daryn Sharp
>         Attachments: HADOOP-6962.patch
>
>
> Currently, FileSystem.mkdirs only applies the permissions to the last level 
> if it was created. It should be applied to *all* levels that are created.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to