garywill / linux-router

Set Linux as router in one command. Support Internet sharing, redsocks, Wifi hotspot, IPv6. Can also be used for routing VM/containers 🛰️ (也欢迎关注B站 https://space.bilibili.com/2123686105 )
GNU Lesser General Public License v2.1
1.67k stars 148 forks source link

dnsmasq: cannot read dnsmasq.conf: Permission denied #57

Closed happyme531 closed 1 year ago

happyme531 commented 1 year ago

The lnxrouter wont work in my Manjaro system without --no-dnsmasq.
When I start it always show the following error

Starting dnsmasq

dnsmasq: cannot read /dev/shm/lnxrouter_tmp/lnxrouter.<interface>.conf.oewTOt/dnsmasq.conf: Permission denied
Error occured

Replacing the dnsmasq with dnsmasq-git does not solve the issue.

(Maybe the same issue as #49 but for this case the git version is not working either)

garywill commented 1 year ago

Have you tried disable apparmor and restart?

Although there's already https://github.com/garywill/linux-router/blob/45ad35d29f347512ce49c1ccda2700f5a5dac96c/lnxrouter#L1921-L1925 but not sure. Try disable apparmor completely then restart Linux

happyme531 commented 1 year ago

Have you tried disable apparmor and restart?

Although there's already

https://github.com/garywill/linux-router/blob/45ad35d29f347512ce49c1ccda2700f5a5dac96c/lnxrouter#L1921-L1925

but not sure. Try disable apparmor completely then restart Linux

You are right. That is apparmor's fault. Thanks!

The existing workaround for apparmor in the script is not working simply because in my environment the "complain" command is actually "aa-complain". Better make a secondary check.