You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "luhuachao (JIRA)" <ji...@apache.org> on 2018/05/28 02:59:00 UTC
[jira] [Created] (HDFS-13626) When the setOwner operation was
denied,The logging username is not appropriate
luhuachao created HDFS-13626:
--------------------------------
Summary: When the setOwner operation was denied,The logging username is not appropriate
Key: HDFS-13626
URL: https://issues.apache.org/jira/browse/HDFS-13626
Project: Hadoop HDFS
Issue Type: Bug
Components: namenode
Affects Versions: 3.0.0-alpha2, 2.7.4, 2.8.0
Environment: hadoop 2.8.2
Reporter: luhuachao
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'
[root@lhccmh1 ~]# hdfs dfs -ls /tmp/test
-rw-r--r-- 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).
The last version patch of issue HDFS-10455 use username but not pc.getUser() in logs;
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);
}
}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org