Articles in this section

Why am I seeing error code 81 even after giving my user the correct roles

Problem Description

After granting a user read and write roles, I’m still seeing role violation errors when trying to perform a read.

Command used to grant ‘myuser’ read and write permissions:

Admin+> manage acl create user myuser password myuser roles read, write

 

User:

admin | user-admin
myuser | read, write

 

Error:

Error: (81) AEROSPIKE_ROLE_VIOLATION

 


Explanation

When granting a user multiple roles within the command line, we must separate each role with a single space. In the example above, we see that the read and write roles are separated by a comma and a space. asadm can silently fail, so running this command incorrectly actually grants the user only one role, which is called ‘read, write’. Please note that users can be successfully granted roles that don’t yet exist.


Solution

  1. (Optional, but recommended) Remove the incorrectly granted role from the user
    Admin+> manage acl revoke user myuser roles read, write

  2. Add the roles by separating them out with a single space
    Admin+> manage acl create user myuser password myuser roles read write


Applies To Earliest Version

Pre 4.9

Applies To Latest Version

Current Version
Was this article helpful?
0 out of 0 found this helpful