juicedata/juicefs · error · AclException
Invalid default ACL: the user, group and other entries are r
Error message
Invalid default ACL: the user, group and other entries are required.
What it means
The same invariant check as the access-ACL case, applied to the DEFAULT scope: if a default ACL exists at all (getDefaultEntries() is non-empty), it must contain DEFAULT user, group and other entries. This is only raised when a default ACL is present but incomplete, so it catches partially specified default ACLs.
Source
Thrown at sdk/java/src/main/java/io/juicefs/utils/AclTransformation.java:190
throw new AclException("Invalid ACL: this entry type must not have a name: " + entry + ".");
}
prevEntry = entry;
}
ScopedAclEntries scopedEntries = new ScopedAclEntries(aclBuilder);
checkMaxEntries(scopedEntries);
// Search for the required base access entries. If there is a default ACL,
// then do the same check on the default entries.
for (AclEntryType type : EnumSet.of(USER, GROUP, OTHER)) {
AclEntry accessEntryKey = new AclEntry.Builder().setScope(ACCESS).setType(type).build();
if (Collections.binarySearch(scopedEntries.getAccessEntries(), accessEntryKey, ACL_ENTRY_COMPARATOR) < 0) {
throw new AclException("Invalid ACL: the user, group and other entries are required.");
}
if (!scopedEntries.getDefaultEntries().isEmpty()) {
AclEntry defaultEntryKey = new AclEntry.Builder().setScope(DEFAULT).setType(type).build();
if (Collections.binarySearch(scopedEntries.getDefaultEntries(), defaultEntryKey, ACL_ENTRY_COMPARATOR) < 0) {
throw new AclException("Invalid default ACL: the user, group and other entries are required.");
}
}
}
return Collections.unmodifiableList(aclBuilder);
}
private static void checkMaxEntries(ScopedAclEntries scopedEntries) throws AclException {
List<AclEntry> accessEntries = scopedEntries.getAccessEntries();
List<AclEntry> defaultEntries = scopedEntries.getDefaultEntries();
if (accessEntries.size() > MAX_ENTRIES) {
throw new AclException("Invalid ACL: ACL has " + accessEntries.size() + " access entries, which exceeds maximum of " + MAX_ENTRIES + ".");
}
if (defaultEntries.size() > MAX_ENTRIES) {
throw new AclException("Invalid ACL: ACL has " + defaultEntries.size() + " default entries, which exceeds maximum of " + MAX_ENTRIES + ".");
}
}
private static void calculateMasks(List<AclEntry> aclBuilder, EnumMap<AclEntryScope, AclEntry> providedMask, EnumSet<AclEntryScope> maskDirty, EnumSet<AclEntryScope> scopeDirty) throws AclException {View on GitHub (pinned to c9a67b23e8)
Solutions
- Include the full set of base default entries (default:user::, default:group::, default:other::) whenever any default entry is present.
- If only an access ACL was intended, remove all default: entries from the spec instead of leaving a partial default ACL.
- Compute the base default permissions from the existing access ACL and add them to the spec.
Example fix
// before mergeAclEntries(path, "default:user:alice:rwx"); // after mergeAclEntries(path, "default:user::rwx,default:user:alice:rwx,default:group::r-x,default:other::r--");
Defensive patterns
Strategy: validation
Validate before calling
def default_acl_complete(entries):
d = [e for e in entries if e.getScope() == AclEntryScope.DEFAULT]
if not d:
return True
types = {e.getType() for e in d}
return {AclEntryType.USER, AclEntryType.GROUP, AclEntryType.OTHER} <= types Try / catch
try {
mergeAclEntries(path, spec);
} catch (AclException e) {
if (e.getMessage().contains("Invalid default ACL")) {
spec = addBaseDefaultEntries(spec);
mergeAclEntries(path, spec);
} else throw e;
} Prevention
- Whenever any default: entry is present, emit the full default base trio too.
- Derive default base permissions from the access ACL's base entries.
- Test directory ACLs for the complete default trio before applying.
When it happens
Trigger: Calling mergeAclEntries/replaceAclEntries with a default ACL (e.g. 'default:user:alice:rwx' or 'default:group::r-x' alone) that lacks the required default:user::, default:group:: and default:other:: trio.
Common situations: Setting a default ACL for inheritance on a directory by adding only named default entries; copying a default ACL from another tool that omitted base entries; hand-editing an ACL dump and dropping default:other::.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Invalid ACL: the user, group and other entries are required.
- Invalid ACL: ACL has " + defaultEntries.size() + " default e
- No sources given
- Source file " + normalizePath(src) + " is no
- Invalid ACL: multiple entries with same scope, type and name
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/8b6377f27163ee2e.
Report an issue: GitHub.