hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjay Radia (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-6962) FileSystem.mkdirs(Path, FSPermission) should use the permission for all of the created directories
Date Thu, 19 May 2011 00:09:47 GMT

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

Sanjay Radia commented on HADOOP-6962:
--------------------------------------

Daryn. There are 2 mkdirs methods.
* The *static* FileSystem#mkdirs(fs, dir, permission) is very explicitly
creating the dirs with the default and changing the permissions of the new leaf. This is 
not accidental.
* the *non static* Filesystem#mkdirs is an abstract method. Raw local file system implements
mkdirs as
{code}
  public boolean mkdirs(Path f, FsPermission permission) throws IOException {
    boolean b = mkdirs(f);
    if(b) {
      setPermission(f, permission);
    }
    return b;
  }
{code}


> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message