Skip to content

[BUG]luci-app-qmodem-next点击停止报错 #162

@junhong-l

Description

@junhong-l

Failed to stop QModem Network: RPC call to luci/setInitAction failed with error -32002: Access denied at ClassConstructor.handleCallReply (http://10.0.0.1/luci-static/resources/rpc.js?v=26.013.29393~a450e97:11:3)

AI提供的解决方案,写入就成功了。

ACL=/usr/share/rpcd/acl.d/luci-app-qmodem-next.json
cp -a "$ACL" "$ACL.bak.$(date +%s)"

# 如果已经有 luci 权限就不重复加;没有就加到 write.ubus 下
grep -q '"luci"[[:space:]]*:[[:space:]]*\[[^]]*"setInitAction"' "$ACL" || \
sed -i 's/"ubus"[[:space:]]*:[[:space:]]*{/"ubus": {\n\t\t\t\t"luci": [ "setInitAction" ],/1' "$ACL"

# 重启 rpcd/uhttpd 使 ACL 生效
/etc/init.d/rpcd restart
/etc/init.d/uhttpd restart

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions