zoukankan      html  css  js  c++  java
  • LuCi 提示:权限不足,无法读取UCI配置。

    问题

    自己做了扩展,需要调动model的cbi文件去控制/etc/config/下的配置文件,不过提示出问题:权限不足,无法读取UCI配置

    图是网上的、、、

    解决

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

    {
        "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" ]
            }
        }
    }

     以上红色的部分为新增加部分,更改完成后,保存重启即可~

  • 相关阅读:
    移动端和pc端的判断,不同端做不同的处理
    easyUI combobox的使用
    [Codeforces #196] Tutorial
    [Codeforces #174] Tutorial
    [Codeforces #190] Tutorial
    [Codeforces #211] Tutorial
    [Codeforces #192] Tutorial
    [BZOJ 3196] 二逼平衡树
    [BZOJ 1058] 报表统计
    [P3709] 大爷的字符串题
  • 原文地址:https://www.cnblogs.com/biao-wu/p/13275486.html
Copyright © 2011-2022 走看看