ACL SAVE
ACL SAVE
- Group
- ACL
- Complexity
- O(N) where N is the number of users
- Arity
- 2 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
ACL SAVE writes every user, in the ACL LIST format,
to the file set with the aclfile directive. The file is written to a
temporary file first and then renamed over the old one, so a failed save
leaves the previous file intact. Users are kept in memory only until you
save them, so run ACL SAVE after changing users if they should survive a
restart.
Return value
Section titled “Return value”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 could not be written | ERR Cannot open '<path>' for writing: <reason>, or another message naming the step that failed |
Examples
Section titled “Examples”127.0.0.1:6379> ACL SETUSER reports on >reports-password ~report:* -@all +@readOK127.0.0.1:6379> ACL SAVEOKCompatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8. The error texts differ.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.