{"record":{"id":"738c818e8b278175","repo":"apache/hadoop","slug":"permission-denied-user-is-not-the-owner-of-ino","errorCode":null,"errorMessage":"Permission denied. user={} is not the owner of inode={}","messagePattern":"Permission denied\\. user=(.+?) is not the owner of inode=(.+?)","errorType":"exception","errorClass":"AccessControlException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java","lineNumber":564,"sourceCode":"      if (pathByNameArr.length == 1 && pathByNameArr[0] == null) {\n        elements[0] = \"\";\n      } else {\n        for (int i = 0; i < elements.length; i++) {\n          elements[i] = DFSUtil.bytes2String(pathByNameArr[i]);\n        }\n      }\n      inodeAttrs = getAttributesProvider().getAttributes(elements, inodeAttrs);\n    }\n    return inodeAttrs;\n  }\n\n  /** Guarded by {@link FSNamesystem#readLock(RwLockMode)}. */\n  private void checkOwner(INodeAttributes[] inodes, byte[][] components, int i)\n      throws AccessControlException {\n    if (getUser().equals(inodes[i].getUserName())) {\n      return;\n    }\n    throw new AccessControlException(\n        \"Permission denied. user=\" + getUser() +\n        \" is not the owner of inode=\" + getPath(components, 0, i));\n  }\n\n  /** Guarded by {@link FSNamesystem#readLock(RwLockMode)}.\n   * @throws AccessControlException\n   * @throws ParentNotDirectoryException\n   * @throws UnresolvedPathException\n   */\n  private void checkTraverse(INodeAttributes[] inodeAttrs, INode[] inodes,\n      byte[][] components, int last) throws AccessControlException,\n          UnresolvedPathException, ParentNotDirectoryException {\n    for (int i=0; i <= last; i++) {\n      checkIsDirectory(inodes[i], components, i);\n      check(inodeAttrs, components, i, FsAction.EXECUTE);\n    }\n  }\n","sourceCodeStart":546,"sourceCodeEnd":582,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java#L546-L582","documentation":"Error \"Permission denied. user={} is not the owner of inode={}\" thrown in apache/hadoop.","triggerScenarios":"A non-owner user attempts chmod, chown, or setPermission on an inode.","commonSituations":"A regular user trying to chmod or chown files owned by another user without superuser rights.","solutions":["Perform the operation as the inode owner or as the HDFS superuser; only the owner may change permissions/ownership."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}