You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Siyao Meng (JIRA)" <ji...@apache.org> on 2019/03/26 15:44:00 UTC

[jira] [Commented] (HDFS-12161) Distcp does not preserve ownership in destination parent folder

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

Siyao Meng commented on HDFS-12161:
-----------------------------------

I've just tested this on my local machine with single node (NN+1DN). But the destination parent folder does preserve the ownership.
Either this has been fixed, or this is caused by Sentry/Ranger.

Not reproducible. Thus closing this jira for now.

[~saileshpatel] Feel free to reopen this if you have something to add.

> Distcp does not preserve ownership in  destination parent folder
> ----------------------------------------------------------------
>
>                 Key: HDFS-12161
>                 URL: https://issues.apache.org/jira/browse/HDFS-12161
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs
>    Affects Versions: 2.6.0
>            Reporter: Sailesh Patel
>            Assignee: Siyao Meng
>            Priority: Minor
>
> After running distcp as user 'usertest' which is a hdfs superuser, the destination folder ownership is not preserved.
> e.g.
> {code:bash}
> hadoop distcp -pugpaxt -update -skipcrccheck /tmp/usertest  /tmp/new_user/usertest_copy
> {code}
>  After distcp is executed, the parent folder has ownership with 'usertest' : 
> {code:bash}
> drwxr-xr-x   - usertest supergroup          0 2017-07-13 22:09 /tmp/new_user/usertest_copy 
> {code}  
>   and the actual files copied by distcp preserved the permissions:
> {code:bash}
> drwxr-xr-x   - hive hive          0 2017-07-13 22:09 /tmp/new_user/usertest_copy/dir1
> -rw-r--r--   1 hdfs hive        287 2017-07-13 22:09 /tmp/new_user/usertest_copy/test1.txt
> {code}
> The distcp options (-pugpaxt) does not apply to the destination parent directory specified in the distcp command e.g. "/tmp/new_user/usertest_copy".
> Can we document this in https://hadoop.apache.org/docs/r1.2.1/distcp2.html under Command Line Options
> The destination folder location needs to be pre-created with correct ownership/permissions before using distcp. The preserve options do not apply to parent folder.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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