hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sivaguru Sankaridurg (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HADOOP-14820) Fix for HDFS semantics parity for mkdirs -p
Date Thu, 31 Aug 2017 05:53:00 GMT

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

Sivaguru Sankaridurg edited comment on HADOOP-14820 at 8/31/17 5:52 AM:
------------------------------------------------------------------------

*NativeAzureFileSystem.java*
*L1714* -  Thanks for pointing this out. The fix to {{getAncestor}} should take care of this.
This is the correct fix. The call to {noformat}performAuthCheck{noformat} on L1714 is required.

*L2426* - This has been fixed. Please see changes to {noformat}getAncestor{noformat} in 003.patch.
The naming is consistent with the definition mentioned at [https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html#Permission_Checks].
{noformat} Ancestor: The last existing component of the requested path. For example, for the
path /foo/bar/baz, the ancestor path is /foo/bar if /foo/bar exists. The ancestor path is
/foo if /foo exists but /foo/bar does not exist.{noformat}

*L2459* - Same as above.




was (Author: sisankar@microsoft.com):
*NativeAzureFileSystem.java*
*L1714* -  Thanks for pointing this out. The fix to {panel}getAncestor{panel} should take
care of this. This is the correct fix. The call to {noformat}performAuthCheck{noformat} on
L1714 is required.

*L2426* - This has been fixed. Please see changes to {noformat}getAncestor{noformat} in 003.patch.
The naming is consistent with the definition mentioned at [https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html#Permission_Checks].
{noformat} Ancestor: The last existing component of the requested path. For example, for the
path /foo/bar/baz, the ancestor path is /foo/bar if /foo/bar exists. The ancestor path is
/foo if /foo exists but /foo/bar does not exist.{noformat}

*L2459* - Same as above.



>  Fix for HDFS semantics parity for mkdirs -p
> --------------------------------------------
>
>                 Key: HADOOP-14820
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14820
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/azure
>            Reporter: Sivaguru Sankaridurg
>            Assignee: Sivaguru Sankaridurg
>              Labels: azure, fs, secure, wasb
>         Attachments: HADOOP-14820.001.patch, HADOOP-14820.002.patch
>
>
> No authorization checks should be made when a user tries to create (mkdirs -p) an existing
folder hierarchy.
> For example, if we start with _/home/hdiuser/prefix_ pre-created, and do the following
operations, the results should be as shown below.
> {noformat}
> hdiuser@hn0-0d2f67:~$ sudo chown root:root prefix
> hdiuser@hn0-0d2f67:~$ sudo chmod 555 prefix
> hdiuser@hn0-0d2f67:~$ ls -l
> dr-xr-xr-x 3 root    root      4096 Aug 29 08:25 prefix
> hdiuser@hn0-0d2f67:~$ mkdir -p /home
> hdiuser@hn0-0d2f67:~$ mkdir -p /home/hdiuser
> hdiuser@hn0-0d2f67:~$ mkdir -p /home/hdiuser/prefix
> hdiuser@hn0-0d2f67:~$ mkdir -p /home/hdiuser/prefix/1
> mkdir: cannot create directory â/home/hdiuser/prefix/1â: Permission denied
> The first three mkdirs succeed, because the ancestor is already present. The fourth one
fails because of a permission check against the (shorter) ancestor (as compared to the path
being created).
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message