Rpcerror luci code 6: Permission denied

I added a custom page under the "system" tab and added the necessary config including

/usr/share/rpcd/acl.d/luci-app-custom.json

But whwneve i browse to the page i get the folliwng error, i've tried private mode etc but still the same

#### RPCError

RPC call to uci/get failed with ubus code 6: Permission denied at ClassConstructor.handleCallReply (http://192.168.1.1/luci-static/resources/rpc.js?v=git-24.264.56413-c7a3562:15:3)

restart rpcd to get new permissions/endpoints.

Great i will try that but shouldn't this happen after a reboot anyway or is some config persistent after a reboot?

Yes, reboot too, check browser js consolle vs ubus call a b '{c: d}'

in console i see

luci.js?v=git-24.264.56413-c7a3562:155 Uncaught (in promise) RPCError: RPC call to uci/get failed with ubus code 6: Permission denied
  at ClassConstructor.handleCallReply (http://192.168.1.1/luci-static/resources/rpc.js?v=git-24.264.56413-c7a3562:15:3)
    at ClassConstructor.raise (http://192.168.1.1/luci-static/resources/luci.js?v=git-24.264.56413-c7a3562:155:3)
    at ClassConstructor.handleCallReply (http://192.168.1.1/luci-static/resources/rpc.js?v=git-24.264.56413-c7a3562:15:3)

Since it is your code - what you are calling?

@stretch if you want better replies, you should consider posting your ACL/RPCD-script/js files.

RPC call to uci/get failed with ubus code 6: Permission denied

seems like you forgot to add the uci permissions to the acl for this user/application