問題
本身作了擴展,須要調動model的cbi文件去控制/etc/config/下的配置文件,不過提示出問題:權限不足,沒法讀取UCI配置。json
圖是網上的、、、app
解決
/usr/share/rpcd/acl.d/luci-base.json 文件添加下面內容 是json文件,注意格式less
{ "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" ] } } }
以上紅色的部分爲新增長部分,更改完成後,保存重啓便可~spa