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 "Yiqun Lin (JIRA)" <ji...@apache.org> on 2018/05/30 09:00:02 UTC
[jira] [Comment Edited] (HDFS-13626) Fix incorrect username when
deny the setOwner operation
[ https://issues.apache.org/jira/browse/HDFS-13626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16494900#comment-16494900 ]
Yiqun Lin edited comment on HDFS-13626 at 5/30/18 8:59 AM:
-----------------------------------------------------------
Committed this to trunk and branch-2. Thanks [~Huachao] for reporting this and thanks [~zvenczel] for the contribution. (Attach the patch for branch-2)
was (Author: linyiqun):
Committed this to trunk and branch-2. Thanks [~Huachao] for reporting this and thanks [~zvenczel] for the contribution.
> Fix incorrect username when deny the setOwner operation
> -------------------------------------------------------
>
> Key: HDFS-13626
> URL: https://issues.apache.org/jira/browse/HDFS-13626
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Affects Versions: 2.8.0, 2.7.4, 3.0.0-alpha2
> Environment: hadoop 2.8.2
> Reporter: luhuachao
> Assignee: Zsolt Venczel
> Priority: Minor
> Fix For: 2.10.0, 3.2.0
>
> Attachments: HDFS-13626-branch-2.001.patch, HDFS-13626.01.patch
>
>
> when do the chown operation on target file /tmp/test with user 'root' to user 'hive', the log displays 'User hive is not a super user' ;This appropriate log here should be 'User root is not a super user'
> {code:java}
> [root@lhccmh1 ~]# hdfs dfs -ls /tmp/test
> rw-rr- 3 root hdfs 0 2018-05-28 10:33 /tmp/test
> [root@lhccmh1 ~]# hdfs dfs -chown hive /tmp/test
> chown: changing ownership of '/tmp/test': User hive is not a super user (non-super user cannot change owner).{code}
> The last version patch of issue HDFS-10455 use username but not pc.getUser() in logs;
> {code:java}
>
> if (!pc.isSuperUser()) {
> if (username != null && !pc.getUser().equals(username)) {
> - throw new AccessControlException("Non-super user cannot change owner");
> + throw new AccessControlException("User " + username
> + + " is not a super user (non-super user cannot change owner).");
> }
> if (group != null && !pc.isMemberOfGroup(group)) {
> - throw new AccessControlException("User does not belong to " + group);
> + throw new AccessControlException(
> + "User " + username + " does not belong to " + group);
> }
> } {code}
>
--
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