apache/hadoop · error · UnsupportedOperationException
{} doesn't support getAclStatus
Error message
{} doesn't support getAclStatus What it means
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.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java:1342
* @param aclSpec List{@literal <AclEntry>} describing modifications, must
* include entries for user, group, and others for compatibility with
* permission bits.
* @throws IOException if an ACL could not be modified
*/
public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException {
throw new UnsupportedOperationException(getClass().getSimpleName()
+ " doesn't support setAcl");
}
/**
* Gets the ACLs of files and directories.
*
* @param path Path to get
* @return RemoteIterator{@literal <AclStatus>} which returns each AclStatus
* @throws IOException if an ACL could not be read
*/
public AclStatus getAclStatus(Path path) throws IOException {
throw new UnsupportedOperationException(getClass().getSimpleName()
+ " doesn't support getAclStatus");
}
/**
* Set an xattr of a file or directory.
* The name must be prefixed with the namespace followed by ".". For example,
* "user.attr".
* <p>
* Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to modify
* @param name xattr name.
* @param value xattr value.
* @throws IOException raised on errors performing I/O.
*/
public void setXAttr(Path path, String name, byte[] value)
throws IOException {
setXAttr(path, name, value, EnumSet.of(XAttrSetFlag.CREATE,View on GitHub (pinned to 2add963021)
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
Example fix
// before
AclStatus acls = fc.getAclStatus(path); // -> UnsupportedOperationException
// after
if (fc.hasPathCapability(path, CommonPathCapabilities.FS_ACLS)) {
AclStatus acls = fc.getAclStatus(path);
} else {
FsPermission p = fc.getFileStatus(path).getPermission(); // mode bits only
} Defensive patterns
Strategy: fallback
Validate before calling
if (fc.hasPathCapability(path, CommonPathCapabilities.FS_ACLS)) {
AclStatus acls = fc.getAclStatus(path);
} Type guard
boolean aclCapable(Path p) throws IOException {
return fc.hasPathCapability(p, CommonPathCapabilities.FS_ACLS);
} Try / catch
try { return fc.getAclStatus(path).getEntries(); } catch (UnsupportedOperationException e) { return aclFromMode(fc.getFileStatus(path).getPermission()); } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- {getClass().getSimpleName()} doesn't support modifyAclEntrie
- {getClass().getSimpleName()} doesn't support removeAclEntrie
- {getClass().getSimpleName()} doesn't support removeDefaultAc
- {} doesn't support removeAcl
- {} doesn't support setAcl
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/b0a84a4fe8216441.
Report an issue: GitHub.