Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.8.0, 2.7.4, 3.0.0-alpha2
-
None
-
hadoop 2.8.2
Description
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-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).
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); } }
Attachments
Attachments
Issue Links
- duplicates
-
HDFS-15194 ERROR log print wrong user info when run distcp
- Resolved
- relates to
-
HDFS-10455 Logging the username when deny the setOwner operation
- Resolved