{"record":{"id":"2c491bc0ae157a4c","repo":"apache/hadoop","slug":"getclass-getsimplename-doesn-t-support-remov","errorCode":null,"errorMessage":"{getClass().getSimpleName()} doesn't support removeAclEntries","messagePattern":"(.+?) doesn't support removeAclEntries","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java","lineNumber":1289,"sourceCode":"   * @throws IOException if an ACL could not be modified\n   */\n  public void modifyAclEntries(Path path, List<AclEntry> aclSpec)\n      throws IOException {\n    throw new UnsupportedOperationException(getClass().getSimpleName()\n        + \" doesn't support modifyAclEntries\");\n  }\n\n  /**\n   * Removes ACL entries from files and directories.  Other ACL entries are\n   * retained.\n   *\n   * @param path Path to modify\n   * @param aclSpec List{@literal <AclEntry>} describing entries to remove\n   * @throws IOException if an ACL could not be modified\n   */\n  public void removeAclEntries(Path path, List<AclEntry> aclSpec)\n      throws IOException {\n    throw new UnsupportedOperationException(getClass().getSimpleName()\n        + \" doesn't support removeAclEntries\");\n  }\n\n  /**\n   * Removes all default ACL entries from files and directories.\n   *\n   * @param path Path to modify\n   * @throws IOException if an ACL could not be modified\n   */\n  public void removeDefaultAcl(Path path)\n      throws IOException {\n    throw new UnsupportedOperationException(getClass().getSimpleName()\n        + \" doesn't support removeDefaultAcl\");\n  }\n\n  /**\n   * Removes all but the base ACL entries of files and directories.  The entries\n   * for user, group, and others are retained for compatibility with permission","sourceCodeStart":1271,"sourceCodeEnd":1307,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java#L1271-L1307","documentation":"AbstractFileSystem.removeAclEntries is an opt-in ACL operation with no base implementation: it throws UnsupportedOperationException with the filesystem's simple class name unless the concrete AFS implements ACLs. Support exists only on HDFS (dfs.namenode.acls.enabled=true), RawLocalFileSystem where the OS has POSIX ACLs, and pass-through wrappers; FileContext delegates here, so 'hadoop fs -setfacl -x' fails the same way.","triggerScenarios":"fc.removeAclEntries(path, aclSpec) on S3A/ABFS/GCS, ftp, or http filesystems; scripts running setfacl -x against a defaultFS without ACL support; ACL cleanup code applied uniformly across mixed filesystems.","commonSituations":"Centralized permission-management tooling that prunes ACL entries on all stores; migrations from HDFS to object stores leaving ACL logic in place; containerized local tests on kernel filesystems lacking ACL mounts.","solutions":["Gate on capability: fc.hasPathCapability(path, CommonPathCapabilities.FS_ACLS) before calling","On HDFS confirm dfs.namenode.acls.enabled=true; the client cannot add ACL support to a store that lacks it","Fall back to resetting permissions via setPermission when ACL removal is unsupported"],"exampleFix":"// before\nfc.removeAclEntries(path, aclSpec); // -> UnsupportedOperationException\n\n// after\nif (fc.hasPathCapability(path, CommonPathCapabilities.FS_ACLS)) {\n  fc.removeAclEntries(path, aclSpec);\n} else {\n  fc.setPermission(path, fallbackPerms);\n}","handlingStrategy":"validation","validationCode":"if (fc.hasPathCapability(path, CommonPathCapabilities.FS_ACLS)) {\n  fc.removeAclEntries(path, aclSpec);\n}","typeGuard":"boolean aclCapable(Path p) throws IOException {\n  return fc.hasPathCapability(p, CommonPathCapabilities.FS_ACLS);\n}","tryCatchPattern":"try { fc.removeAclEntries(path, aclSpec); } catch (UnsupportedOperationException e) { /* no ACL support: nothing to remove, or reset with setPermission */ }","preventionTips":["Gate ACL pruning tooling on the fs.capability.paths.acls capability","Skip ACL commands silently for object stores rather than failing the whole run","Verify dfs.namenode.acls.enabled on HDFS before running setfacl-based scripts"],"tags":["acl","unsupported-feature","object-store","permissions","hadoop-fs"],"backgroundTag":"filesystem-capability-unsupported","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}