{"record":{"id":"ffdf6bd75451bb06","repo":"apache/hadoop","slug":"changing-ownership-of-item-e-getmes","errorCode":null,"errorMessage":"changing ownership of '\" + item + \"': \" + e.getMessage()","messagePattern":"changing ownership of '\" \\+ item \\+ \"': \" \\+ e\\.getMessage\\(\\)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsShellPermissions.java","lineNumber":186,"sourceCode":"        throw new IllegalArgumentException(\n            \"'\" + ownerStr + \"' does not specify owner or group.\");\n      }    \n    }\n    \n    @Override\n    protected void processPath(PathData item) throws IOException {\n      //Should we do case insensitive match?\n      String newOwner = (owner == null || owner.equals(item.stat.getOwner())) ?\n                        null : owner;\n      String newGroup = (group == null || group.equals(item.stat.getGroup())) ?\n                        null : group;\n\n      if (newOwner != null || newGroup != null) {\n        try {\n          item.fs.setOwner(item.path, newOwner, newGroup);\n        } catch (IOException e) {\n          LOG.debug(\"Error changing ownership of \" + item, e);\n          throw new IOException(\n              \"changing ownership of '\" + item + \"': \" + e.getMessage());\n        }\n      }\n    }\n  }\n\n  /**\n   * Used to change group of files \n   */\n  public static class Chgrp extends Chown {\n    public static final String NAME = \"chgrp\";\n    public static final String USAGE = \"[-R] GROUP PATH...\";\n    public static final String DESCRIPTION =\n      \"This is equivalent to -chown ... :GROUP ...\";\n\n    static private final Pattern chgrpPattern = \n      Pattern.compile(\"^\\\\s*(\" + allowedChars + \"+)\\\\s*$\");\n","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsShellPermissions.java#L168-L204","documentation":"Error \"changing ownership of '\" + item + \"': \" + e.getMessage()\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsShellPermissions.java:186 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the nested exception message for the per-file failure cause.","Verify the target user/group exists and the caller has superuser privileges."],"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-23T01:17:44.959Z"}