RUTX50 / RutOS 7.25.3 - Grant JSON-RPC file.read to non-admin user

I’m trying to create a non-admin user that can authenticate via JSON-RPC and execute:[“SESSION”,“file”,“read”,{“path”:“/etc/config/network”}]

What I’ve found

  • Device: RUTX50
  • Firmware: RutOS 7.25.3
  • JSON-RPC is enabled.
  • Non-admin user (filereader) can successfully log in via session.login.
  • Admin user can successfully execute file.read.
  • Non-admin user gets:

{ “code”: -32002, “message”: “Access denied”}

ACL investigation

ubus -v list file shows:

  • read
  • write
  • list
  • stat
  • md5
  • remove
  • exec

/usr/share/rpcd/acl.d/superuser.json contains:

“file”: { “*”: [ “read”, “write”, “exec” ] }

I created: /usr/share/rpcd/acl.d/filereader.json

{ “filereader”: { “description”: “Allow file read only”, “read”: { “file”: { “*”: [ “read” ] } } } }

but the permission is not applied to the user (filereader)

Question

Has anyone successfully assigned a custom rpcd ACL (such as file.read) to a non-admin user on RutOS 7.25.3? If so, where is the user-to-ACL mapping configured? I can’t find any ACL assignment option in the WebUI or an obvious configuration in /etc/config/rpcd.

Greetings,

Thank you for reaching out and for sharing the details of your testing.

I’ll check with our R&D department to confirm whether assigning a custom rpcd ACL to a non-admin user is supported and, if so, how that assignment should be configured. I’ll follow up here once I have clarification.

Kind regards,
T.

Many thanks.