路由器openwrt安装ipk第三方软件LuCi 提示:权限不足,无法读取UCI配置。

问题

路由器openwrt安装ipk第三方软件时,LuCi提示出问题:权限不足,无法读取UCI配置。

图是网上的

解决方法

/usr/share/rpcd/acl.d/luci-base.json 文件添加下面内容 是json文件,注意格式
添加以下代码到文件中

    "uci-access": {
        "description": "Grant uci write access to all configurations",
        "read": {
            "uci": [ "*" ]
        },
        "write": {
            "uci": [ "*" ]
        }
    },

添加后效果如下:

{
    "unauthenticated": {
        "description": "Allow system feature probing",
        "read": {
            "ubus": {
                "luci": [ "getFeatures" ]
            }
        }
    },

    "luci-base": {
        "description": "Grant access to basic LuCI procedures",
        "read": {
            "file": {
                "/": [ "list" ],
                "/*": [ "list" ]
            },
            "ubus": {
                "file": [ "list" ],
                "uci": [ "changes", "get" ]
            }
        },
        "write": {
            "cgi-io": [ "upload" ],
            "file": {
                "/etc/luci-uploads/*": [ "write" ]
            },
            "ubus": {
                "file": [ "remove" ],
                "uci": [ "add", "apply", "confirm", "delete", "order", "rename", "set" ]
            }
        }
    },

    "uci-access": {
        "description": "Grant uci write access to all configurations",
        "read": {
            "uci": [ "*" ]
        },
        "write": {
            "uci": [ "*" ]
        }
    },

    "luci-base-network-status": {
        "description": "Grant access to network status information",
        "read": {
            "ubus": {
                "luci-rpc": [ "getBoardJSON", "getHostHints", "getNetworkDevices", "getWirelessDevices" ],
                "network": [ "get_proto_handlers" ],
                "network.interface": [ "dump" ]
            },
            "uci": [ "luci", "network", "wireless" ]
        }
    }
}
作者:Vanish
出处:https://vzone.me/889/
时间:2020-08-15
版权:本文采用「CC BY 4.0」知识共享国际许可协议,如有侵权请联系作者。

评论

暂无

添加新评论