Community discussions

MUM Europe 2020
 
essele
newbie
Topic Author
Posts: 28
Joined: Tue Jan 07, 2014 5:55 am

Metarouter filesystem permissions problem

Tue Jan 21, 2014 6:03 am

Hi,

It seems that there is a permission issue with the way the filesystem works on metarouter ... dnsmasq switches to the 'nobody' user once it gets going, and after that it doesn't seem to be able to access anything on the filesystem.
Jan 1 00:01:03 dnsmasq[1480]: failed to access /tmp/resolv.conf.auto: Permission denied
Jan 1 00:01:03 dnsmasq[1480]: failed to load names from /etc/hosts: Permission denied
Jan 1 00:01:03 dnsmasq-dhcp[1480]: failed to read /etc/ethers: Permission denied
Note: this is on the Mikrotik provided image, but it's consistent on more recent OpenWRT builds.

My immediate assumption is that it is a limitation of the metafs, /tmp/resolv.conf.auto is on a tmpfs, but the mountpoint /tmp is still on the metafs so it may still be a factor. My guess is that metafs (or rather the backend of it) only supports root access to files.

For dnsmasq you can work around it with a "user=root" in /etc/dnsmasq.conf ... but there are going to be quite a few things like this, so it really needs to be fixed.

As a side question ... I'm not sure how the backend works, but is there a way from routeros to get at the metarouter files? It would be nice to have some way of backing them up without having to do it from the metarouter.

Regards,

Lee.
 
hecke
just joined
Posts: 3
Joined: Fri Jan 09, 2015 12:38 am

Re: Metarouter filesystem permissions problem

Thu Jan 15, 2015 12:31 am

I observed the same behavior (RB2011UiAS-2HnD-IN, ROS 6.24, OpenWrt 14.07) - no file system access for newly created users.

Turned out that _after_ a reboot of the host (the router) the permission problem in the VM is gone.
(its not enough to reboot the VM).

Thought this is a bug in my program... took me 4 hours of my life and ate ~100 hairs from the back of my head.

Who is online

Users browsing this forum: No registered users and 5 guests