Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.7.2
-
None
-
Reviewed
Description
The attached patch appends the user name in the logging when the setOwner operation is denied due to insufficient permissions on this user (based on his/her name).
The same practice is used in FSPermissionChecker such as checkOwner() and checkSuperuserPrivilege().
FSDirAttrOp.java
if (!pc.isSuperUser()) { if (username != null && !pc.getUser().equals(username)) { - throw new AccessControlException("Non-super user cannot change owner"); + throw new AccessControlException("User " + pc.getUser() + + " is not a super user (non-super user cannot change owner)."); } if (group != null && !pc.containsGroup(group)) { - throw new AccessControlException("User does not belong to " + group); + throw new AccessControlException("User " + pc.getUser() + + " does not belong to " + group); }
Attachments
Attachments
Issue Links
- is related to
-
HDFS-13626 Fix incorrect username when deny the setOwner operation
- Resolved