muink / luci-app-netspeedtest

LuCI Network Speed Test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

droideggs opened this issue · comments

I get this error after installing the package. i have python3-speedtest-cli installed already.

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

nvm it started working randomly. please close.

Same issue using 23.05.0-rc4.

It's still an issue with OpenWrt 23.05.2.

I am using openwrt 21.02 and I have integrated the luci-app-netspeedtest, and faced the same issue. From my analysis, I found that the netspeedtest app was not found in the command output 'ubus call session list'. Due to this I was seeing the permission denied error. Further analysis into it as to why the netspeedtest was not included, I found that the ACL for luci-app-netspeedtest was providing read & write permissions for uci as below:

                "read": {
                        "file": {
                                "/etc/init.d/netspeedtest": [ "exec" ],
								"/usr/lib/netspeedtest/speedtest": [ "exec" ],
								"/var/speedtest_result": [ "read" ]
                        },
						"ubus": {
								"service" : [ "list" ]
                        },
						"uci": [ "netspeedtest" ],
						"uci": [ "librespeed-go" ]
                },
                "write": {
						"uci": [ "netspeedtest" ],
						"uci": [ "librespeed-go" ]
                }

If I made a change for UCI permissions for applications as below, and it works wonderfully. I donot see any errors in UI and all applications work properly. Hope the solution works for you as well.:

                "read": {
                        "file": {
                                "/etc/init.d/netspeedtest": [ "exec" ],
								"/usr/lib/netspeedtest/speedtest": [ "exec" ],
								"/var/speedtest_result": [ "read" ]
                        },
						"ubus": {
								"service" : [ "list" ]
                        },
						"uci": [ "netspeedtest", "librespeed-go" ]
                },
                "write": {
						"uci": [ "netspeedtest", "librespeed-go" ]
                }