Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

ACL LOAD

Last updated
ACL LOAD
Group
ACL
Complexity
O(N) where N is the number of users in the file
Arity
2 (exactly, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

ACL LOAD reads the file set with the aclfile directive and replaces the users in memory with the ones it defines. Use it after editing the file by hand. Clients whose user was removed or lost permissions are handled as if the change came from ACL SETUSER or ACL DELUSER: clients of a user that no longer exists are disconnected.

The whole file is checked first. If any line is invalid, nothing changes and the error names the line. If the file does not define the default user, the current default user is kept, so a server protected by requirepass stays protected.

Each line has the form user <name> [rule ...], with the rules of ACL SETUSER. Empty lines and lines starting with # are skipped.

Simple string OK in RESP2 and RESP3, or one of these errors:

Case Error
No aclfile configured ERR This HotKV instance was not configured with an aclfile. Set 'aclfile <path>' in the config to persist ACL users.
The file cannot be read ERR Cannot open '<path>' for reading: <reason>
A line that is not user <name> ... ERR Error in line <n>: expected 'user <name> [rules...]'
An invalid rule ERR Error in line <n>: '<rule>': <reason>
A user defined twice ERR Error in line <n>: user '<name>' is defined more than once
127.0.0.1:6379> ACL LOAD
OK
127.0.0.1:6379> ACL LOAD
(error) ERR Error in line 3: '+nosuchcommand': Unknown command or category name in ACL

Same behaviour as Redis 7 and Valkey 8, including the all-or-nothing load. The error texts differ.

ACL SAVE, ACL LIST, ACL SETUSER