{"record":{"id":"9c6c85f3392e306f","repo":"apache/hadoop","slug":"changing-permissions-of-item-e-getm","errorCode":null,"errorMessage":"changing permissions of '\" + item + \"': \" + e.getMessage()","messagePattern":"changing permissions 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":106,"sourceCode":"      try {\n        pp = new ChmodParser(modeStr);\n      } catch (IllegalArgumentException iea) {\n        // TODO: remove \"chmod : \" so it's not doubled up in output, but it's\n        // here for backwards compatibility...\n        throw new IllegalArgumentException(\n            \"chmod : mode '\" + modeStr + \"' does not match the expected pattern.\");      \n      }\n    }\n    \n    @Override\n    protected void processPath(PathData item) throws IOException {\n      short newperms = pp.applyNewPermission(item.stat);\n      if (item.stat.getPermission().toShort() != newperms) {\n        try {\n          item.fs.setPermission(item.path, new FsPermission(newperms));\n        } catch (IOException e) {\n          LOG.debug(\"Error changing permissions of \" + item, e);\n          throw new IOException(\n              \"changing permissions of '\" + item + \"': \" + e.getMessage());\n        }\n      }\n    }    \n  }\n  \n  // used by chown/chgrp\n  static private String allowedChars = Shell.WINDOWS ? \"[-_./@a-zA-Z0-9 ]\" :\n    \"[-+_./@a-zA-Z0-9]\";\n\n  /**\n   * Used to change owner and/or group of files \n   */\n  public static class Chown extends FsShellPermissions {\n    public static final String NAME = \"chown\";\n    public static final String USAGE = \"[-R] [OWNER][:[GROUP]] PATH...\";\n    public static final String DESCRIPTION =\n      \"Changes owner and group of a file. \" +","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsShellPermissions.java#L88-L124","documentation":"Error \"changing permissions 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:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the nested exception message for the per-file failure cause.","Check that the path exists and the user is the owner or superuser."],"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"}