Ubus object listing / parameter accesing by non root user

Hi Team,

I am running ubus 2.1 version on my centos 7.

There is an object published using ambiorix frame work.

I can see object being shown in the ubus list and ubus call Greeter _get gives complete output with root user .


[root@141179 ubus-2020-01-05-d35df8ad]# ubus call Greeter _get
{
        "Greeter.": {
                "NumberOfHistoryEntries": 3,
                "MaxHistory": 10,
                "State": "Running",
                "value": 0
        }
}
[root@141179 ubus-2020-01-05-d35df8ad]# ubus list Greeter
Greeter

The same wants to list it using the non root user.

Added the json file as suggested (https://lists.infradead.org/pipermail/lede-dev/2017-June/008139.html)

cat /usr/share/acl.d/labuser.json
{
  "user": "labuser",
  "access": {
    "Greeter": {
      "methods": [
        "_get",
        "_describe",
        "_list"
      ]
    }
  },
  "send": [
    "Greeter"
  ],
  "subscribe": [
    "Greeter"
  ],
  "publish": [
    "Greeter"
  ]
}

The output shows as contain failed as below

ubus call Greeter _list
Command failed: Not found

below is the ubus monitor output during this.


-> cccc1532 #cccc1532          hello: {}
<- cccc1532 #00000000         lookup: {"objpath":"Greeter"}
-> cccc1532 #00000000         status: {"status":0}
<- cccc1532 #00007f26         invoke: {"objid":32550,"method":"_list","data":{}}
-> cccc1532 #00007f26         status: {"status":4}

Any pointers/leads in this would help immensely.

Thanks
vlrk

Can you clarify how this is related to OpenWrt?

I understand not related to openwrt , but I believe there is large group in the openwrt with the ubus usage experience .

Some previous related postings I have seen this forum (Any good UBUS ACL tutorials available?).

So the reason posting here, hoping some one who came across this kind of scenario would respond.

Since this is not a question directly dealing with OpenWrt, your question is best directed to the centos people -- the devs or user groups there should be able to help you find the answer you seek.

1 Like

This topic was automatically closed after 10 hours. New replies are no longer allowed.