ACL LOAD
Since 1.1.0ACL
Syntax
ACL LOADReads the ACL file again and makes its users the server's users, replacing all of those in memory. Use it after editing the file by hand, or after copying one in from another node, to apply it without a restart. The file is the one the aclfile setting names, given at startup (--aclfile <path>, or aclfile in the config file); CONFIG SET cannot change it.
The file has one line per user, user <name> <rules...>, in the form ACL LIST prints and ACL SAVE writes. Loading is all or nothing:
- A file with an error, a line that does not start with
user, an unknown rule or category, or a user named twice, changes nothing, and the error names the line. - Otherwise the file is what the users now are. A user not in it is deleted, and its connections are closed. A user in it gets the file's rules and passwords, and connections logged in as it stay open under the new rules. A password no longer in the file no longer works.
- If the file has no
defaultuser,defaultis reset to one that may run everything, with no password (or therequirepasspassword, if one is set).
A server started with an aclfile that does not exist, or has an error, does not start. Users are not replicated: give every node the same file. See Security.
Reply
OK.ERR This KiviDB instance is not configured to use an ACL filewithout anaclfile.ERR <path>: line <n>: <what is wrong>. WARNING: ACL errors detected, no change to the previously active ACL rules was performedif the file has an error. Several bad lines are listed together, joined by;.ERR opening '<path>': <reason>. WARNING: ACL errors detected, no change to the previously active ACL rules was performedif the file cannot be read.
Examples
> ACL LOAD
OK
> ACL LOAD
(error) ERR /etc/kividb/users.acl: line 2: error in rule '+@nosuchcat': Unknown command or category name in ACL. WARNING: ACL errors detected, no change to the previously active ACL rules was performed
On a server started without an aclfile:
> ACL LOAD
(error) ERR This KiviDB instance is not configured to use an ACL file