464 字
2 分钟
0
OpenWrt Luci LEDE 权限不足,无法读取UCI配置。Insufficient permissions to read UCI configuration.
OpenWRT 安装一个东西后出现了此问题,初步推测是权限出现问题。
解决方案
输入命令:
nano /usr/share/rpcd/acl.d/luci-base.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" ]
}
}
}
输入 Ctrl + O 保存,OpenWRT 安装一个东西后出现了此问题,初步推测是权限出现问题。
解决方案
输入命令:
nano /usr/share/rpcd/acl.d/luci-base.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" ]
}
}
}
输入 Ctrl + O 保存,然后 Ctrl + X 退出,再输入 reboot
回车,等重启后即可解决。然后 Ctrl + X 退出,再输入 reboot
回车,等重启后即可解决。
OpenWrt Luci LEDE 权限不足,无法读取UCI配置。Insufficient permissions to read UCI configuration.
https://blog.lzc256.com/posts/openwrt-luci-lede-quan-xian-bu-zu-wu-fa-du-qu-uci-pei-zhi-insufficient-permissions-to-read-uci-configuration/