{"record":{"id":"b0a84a4fe8216441","repo":"apache/hadoop","slug":"doesn-t-support-getaclstatus","errorCode":null,"errorMessage":"{} doesn't support getAclStatus","messagePattern":"(.+?) doesn't support getAclStatus","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java","lineNumber":1342,"sourceCode":"   * @param aclSpec List{@literal <AclEntry>} describing modifications, must\n   * include entries for user, group, and others for compatibility with\n   * permission bits.\n   * @throws IOException if an ACL could not be modified\n   */\n  public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException {\n    throw new UnsupportedOperationException(getClass().getSimpleName()\n        + \" doesn't support setAcl\");\n  }\n\n  /**\n   * Gets the ACLs of files and directories.\n   *\n   * @param path Path to get\n   * @return RemoteIterator{@literal <AclStatus>} which returns each AclStatus\n   * @throws IOException if an ACL could not be read\n   */\n  public AclStatus getAclStatus(Path path) throws IOException {\n    throw new UnsupportedOperationException(getClass().getSimpleName()\n        + \" doesn't support getAclStatus\");\n  }\n\n  /**\n   * Set an xattr of a file or directory.\n   * The name must be prefixed with the namespace followed by \".\". For example,\n   * \"user.attr\".\n   * <p>\n   * Refer to the HDFS extended attributes user documentation for details.\n   *\n   * @param path Path to modify\n   * @param name xattr name.\n   * @param value xattr value.\n   * @throws IOException raised on errors performing I/O.\n   */\n  public void setXAttr(Path path, String name, byte[] value)\n      throws IOException {\n    setXAttr(path, name, value, EnumSet.of(XAttrSetFlag.CREATE,","sourceCodeStart":1324,"sourceCodeEnd":1360,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java#L1324-L1360","documentation":"getAclStatus is the read side of the ACL API and, like the writers, has no base implementation: AbstractFileSystem throws UnsupportedOperationException with the filesystem's simple class name unless the AFS implements ACLs. Reading works only on HDFS (dfs.namenode.acls.enabled=true) and POSIX-ACL local filesystems; 'hadoop fs -getfacl' and FileContext.getAclStatus fail identically elsewhere.","triggerScenarios":"fc.getAclStatus(path) on an object store, ftp, or http filesystem; getfacl commands run against a defaultFS without ACL support; audit tools that enumerate ACLs across all stores in a data lake.","commonSituations":"Security audit/scanner tooling iterating mixed-protocol filesystems; report generators ported from HDFS-only environments; tests on LocalFs where the kernel filesystem has no ACLs enabled.","solutions":["Probe fc.hasPathCapability(path, CommonPathCapabilities.FS_ACLS) before reading and treat ACLs as absent when false","Degrade to fc.getFileStatus(path).getPermission() (the 16-bit mode) for display or audit purposes","On HDFS confirm dfs.namenode.acls.enabled=true so the read path is available"],"exampleFix":"// before\nAclStatus acls = fc.getAclStatus(path); // -> UnsupportedOperationException\n\n// after\nif (fc.hasPathCapability(path, CommonPathCapabilities.FS_ACLS)) {\n  AclStatus acls = fc.getAclStatus(path);\n} else {\n  FsPermission p = fc.getFileStatus(path).getPermission(); // mode bits only\n}","handlingStrategy":"fallback","validationCode":"if (fc.hasPathCapability(path, CommonPathCapabilities.FS_ACLS)) {\n  AclStatus acls = fc.getAclStatus(path);\n}","typeGuard":"boolean aclCapable(Path p) throws IOException {\n  return fc.hasPathCapability(p, CommonPathCapabilities.FS_ACLS);\n}","tryCatchPattern":"try { return fc.getAclStatus(path).getEntries(); } catch (UnsupportedOperationException e) { return aclFromMode(fc.getFileStatus(path).getPermission()); }","preventionTips":["Treat ACL reads as optional metadata: always have a mode-bits fallback for audits","Cache the capability result per filesystem so bulk audits do not re-probe per file","On HDFS ensure dfs.namenode.acls.enabled=true so getfacl tooling works"],"tags":["acl","unsupported-feature","object-store","audit","hadoop-fs"],"backgroundTag":"filesystem-capability-unsupported","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}