Modify

Opened 11 years ago

Closed 11 years ago

Last modified 4 years ago

#1812 closed defect (fixed)

dnsmasq does not have privs to /etc/host and /tmp/resolv*

Reported by: ielbury@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version:
Keywords: Cc:

Description

After dnsmasq has changed user to nobody, it cannot open the syslog, /etc/hosts and any of the /tmp/resolv files as it does not have privilege. The symptoms are that name resolution works fine until dnsmasq is started. If the -d command line option is used then everything works fine as well (As there is no fork or change of user).

The file properties are as follows by default:

-rw-r--r--    1 root     root          502 Jan  1 00:32 /etc/hosts
-rw-r--r--    1 root     root           32 Jan  1 00:32 /tmp/resolv.conf
-rw-r--r--    1 root     root           68 Jan  1 00:00 /tmp/resolv.conf.auto

I can work around it by setting the user=root in the /etc/dnsmasq.conf and then syslog + config files work correctly.

I find this problem in the RB-1XX build.

Attachments (0)

Change History (4)

comment:1 Changed 11 years ago by jirif <jiri.fojtasek@…>

The problem is permission of / folder. I had the same issue with my rb532 when i copied system from CF to NAND. I fixed this problem by command "chmod ugo+x /". Some xx2nand scripts need to be fixed, or just yaffs filesystem autogeneration in kernel.

comment:2 Changed 11 years ago by jirif <jiri.fojtasek@…>

I "hacked" my cf2nand script this way (copy/paste patch):

echo "Copying filesystem..."
( cd /tmp/cf2nand/rootfs; tar c . ) | ( cd /tmp/cf2nand/p2; tar x )
+echo "chmod ugo+x /" > /tmp/cf2nand/p2/etc/uci-defaults/set_root_permission
sync
umount /tmp/cf2nand/p2

comment:3 Changed 11 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Applied in [7633] and [7634], thanks !

comment:4 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.