vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
16.8k stars 3.09k forks source link

关于在官方master下运行状态无luci权限问题!!! #382

Closed zxlhhyccc closed 4 years ago

zxlhhyccc commented 4 years ago

运行状态uci无权限,是否是https://github.com/vernesong/OpenClash/blob/master/luci-app-openclash/files/usr/lib/lua/luci/openclash.lua文件的问题?

maskedeken commented 4 years ago

/usr/share/rpcd/acl.d/luci-app-openclash.json指定的权限还不够,应该再加上/etc/openclash/*的读写权限,还有各种sh脚本的执行权限

guluguru commented 3 years ago

/usr/share/rpcd/acl.d/luci-app-openclash.json指定的权限还不够,应该再加上/etc/openclash/*的读写权限,还有各种sh脚本的执行权限

我的json是这样的,但还是不行,最后很丑陋地降级了map.htm解决了这个问题https://github.com/vernesong/OpenClash/issues/360#issuecomment-624464142

大佬,请问我的json是不是写的有问题

{
        "luci-app-openclash": {
                "description": "Grant service list access to LuCI app shadowsocks-libev",
                "read": {
                        "file": {
                                "/etc/openclash/*": [ "read" ]
                        },
                        "ubus": {
                                "service": [ "list" ],
                                "file": [ "read" ],
                                "luci": [ "getConntrackHelpers" ]
                        },
                        "uci": [ "OpenClash" ]
                },
                "write": {
                        "file": {
                                "/etc/openclash/*": [ "write" ]
                        },
                        "ubus": {
                                "file": [ "write" ]
                        },
                        "uci": [ "OpenClash" ]
                }
        }
}