{"record":{"id":"ab3f05e1c3af20f7","repo":"apache/hadoop","slug":"invalid-acl-acl-has-defaultentries-size-defau","errorCode":null,"errorMessage":"Invalid ACL: ACL has {defaultEntries.size()} default entries, which exceeds maximum of {MAX_ENTRIES}.","messagePattern":"Invalid ACL: ACL has (.+?) default entries, which exceeds maximum of (.+?)\\.","errorType":"exception","errorClass":"AclException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/AclTransformation.java","lineNumber":328,"sourceCode":"            \"Invalid default ACL: the user, group and other entries are required.\");\n        }\n      }\n    }\n    return Collections.unmodifiableList(aclBuilder);\n  }\n\n  // Check the max entries separately on access and default entries\n  // HDFS-7582\n  private static void checkMaxEntries(ScopedAclEntries scopedEntries)\n      throws AclException {\n    List<AclEntry> accessEntries = scopedEntries.getAccessEntries();\n    List<AclEntry> defaultEntries = scopedEntries.getDefaultEntries();\n    if (accessEntries.size() > MAX_ENTRIES) {\n      throw new AclException(\"Invalid ACL: ACL has \" + accessEntries.size()\n          + \" access entries, which exceeds maximum of \" + MAX_ENTRIES + \".\");\n    }\n    if (defaultEntries.size() > MAX_ENTRIES) {\n      throw new AclException(\"Invalid ACL: ACL has \" + defaultEntries.size()\n          + \" default entries, which exceeds maximum of \" + MAX_ENTRIES + \".\");\n    }\n  }\n\n  /**\n   * Calculates mask entries required for the ACL.  Mask calculation is performed\n   * separately for each scope: access and default.  This method is responsible\n   * for handling the following cases of mask calculation:\n   * 1. Throws an exception if the caller attempts to remove the mask entry of an\n   *   existing ACL that requires it.  If the ACL has any named entries, then a\n   *   mask entry is required.\n   * 2. If the caller supplied a mask in the ACL spec, use it.\n   * 3. If the caller did not supply a mask, but there are ACL entry changes in\n   *   this scope, then automatically calculate a new mask.  The permissions of\n   *   the new mask are the union of the permissions on the group entry and all\n   *   named entries.\n   *\n   * @param aclBuilder ArrayList<AclEntry> containing entries to build","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/AclTransformation.java#L310-L346","documentation":"Error \"Invalid ACL: ACL has {defaultEntries.size()} default entries, which exceeds maximum of {MAX_ENTRIES}.\" thrown in apache/hadoop.","triggerScenarios":"setAcl with more than 32 default entries, exceeding the HDFS maximum ACL entries.","commonSituations":"See trigger scenarios.","solutions":["Reduce the number of default ACL entries to at most 32."],"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"}