apache/hadoop · error · AccessControlException
Permission denied. user={} is not the owner of inode={}
Error message
Permission denied. user={} is not the owner of inode={} What it means
Error "Permission denied. user={} is not the owner of inode={}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java:564
if (pathByNameArr.length == 1 && pathByNameArr[0] == null) {
elements[0] = "";
} else {
for (int i = 0; i < elements.length; i++) {
elements[i] = DFSUtil.bytes2String(pathByNameArr[i]);
}
}
inodeAttrs = getAttributesProvider().getAttributes(elements, inodeAttrs);
}
return inodeAttrs;
}
/** Guarded by {@link FSNamesystem#readLock(RwLockMode)}. */
private void checkOwner(INodeAttributes[] inodes, byte[][] components, int i)
throws AccessControlException {
if (getUser().equals(inodes[i].getUserName())) {
return;
}
throw new AccessControlException(
"Permission denied. user=" + getUser() +
" is not the owner of inode=" + getPath(components, 0, i));
}
/** Guarded by {@link FSNamesystem#readLock(RwLockMode)}.
* @throws AccessControlException
* @throws ParentNotDirectoryException
* @throws UnresolvedPathException
*/
private void checkTraverse(INodeAttributes[] inodeAttrs, INode[] inodes,
byte[][] components, int last) throws AccessControlException,
UnresolvedPathException, ParentNotDirectoryException {
for (int i=0; i <= last; i++) {
checkIsDirectory(inodes[i], components, i);
check(inodeAttrs, components, i, FsAction.EXECUTE);
}
}
View on GitHub (pinned to 2add963021)
Solutions
- Perform the operation as the inode owner or as the HDFS superuser; only the owner may change permissions/ownership.
When it happens
Trigger: A non-owner user attempts chmod, chown, or setPermission on an inode.
Common situations: A regular user trying to chmod or chown files owned by another user without superuser rights.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/738c818e8b278175.
Report an issue: GitHub.