[Bug 996166] New: Reading file as 'addn-hosts' from /etc/dnsmasq.conf fails Permission denied
http://bugzilla.opensuse.org/show_bug.cgi?id=996166 Bug ID: 996166 Summary: Reading file as 'addn-hosts' from /etc/dnsmasq.conf fails Permission denied Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.1 Hardware: x86-64 OS: Red Hat 6.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: vcelakv@seznam.cz QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0 Build Identifier: In /etc/dnsmasq.conf # or if you want it to read another file, as well as /etc/hosts, use # this. addn-hosts=/etc/hosts.dns service dnsmasq start journalctl -u dnsmasq ... read /etc/hosts - 8 addresses <- /etc/hosts read OK failed to load names from /etc/hosts.dns: Permission denied Reproducible: Always Steps to Reproduce: 1. install dnmasq dnsmasq --version Dnsmasq version 2.71 2. modify file /etc/dnsmasq.conf, insert line addn-hosts=/etc/hosts.dns 3. cp /etc/hosts /etc/hosts.dns (simplification) 4. service dnsmasq start 5. journalctl dnsmasq[26754]: reading /etc/resolv.conf ... dnsmasq[26754]: read /etc/hosts - 8 addresses dnsmasq[26754]: failed to load names from /etc/hosts.dns: Permission denied ls -lZ /etc/hosts /etc/hosts.dns -rw-r--r-- 1 root root ? 682 Aug 26 12:41 /etc/hosts -rw-r--r-- 1 root root ? 682 Aug 30 07:16 /etc/hosts.dns Actual Results: When you move exec file from /usr/sbin/dnsmasq to /usr/bin/dnsmasq and modify /usr/lib/systemd/system/dnsmasq.service original: ExecStartPre=/usr/sbin/dnsmasq --test ExecStart=/usr/sbin/dnsmasq --log-async --enable-dbus --keep-in-foreground new: ExecStartPre=/usr/bin/dnsmasq --test ExecStart=/usr/bin/dnsmasq --log-async --enable-dbus --keep-in-foreground restart service service dnsmasq stop service dnsmasq start service dnsmasq status This is already okay !! dnsmasq[26841]: read /etc/hosts - 8 addresses dnsmasq[26841]: read /etc/hosts.dns - 8 addresses ps -ef | grep 26841 dnsmasq 26841 1 0 07:26 ? 00:00:00 /usr/bin/dnsmasq --log-async --enable-dbus --keep-in-foreground Problem is selinux, systemd? It is a mystery. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=996166 http://bugzilla.opensuse.org/show_bug.cgi?id=996166#c2 Bat Pul <batpul@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |batpul@gmail.com Resolution|INVALID |--- --- Comment #2 from Bat Pul <batpul@gmail.com> --- It is unclear or impossible to extend the apparmor profile of dnsmasq to use the use the 'hostsdir' keyword in /etc/dnsmasq.conf: # Read all the hosts files contained in the directory. hostsdir=/usr/local/dnsmasq/hosts /etc/apparmor.d/local/usr.sbin.dnsmasq: # Site-specific additions and overrides for 'usr.sbin.dnsmasq' /usr/local/dnsmasq/hosts/ r, /usr/local/dnsmasq/hosts/virt r, I still get: $ systemctl status dnsmasq dnsmasq[20991]: failed to create inotify for /usr/local/dnsmasq/hosts: Permission denied -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=996166 http://bugzilla.opensuse.org/show_bug.cgi?id=996166#c3 --- Comment #3 from Bat Pul <batpul@gmail.com> --- permissions look okay: f: /usr/local/dnsmasq/hosts drwxr-xr-x root root / drwxr-xr-x root root usr drwxr-xr-x root root local drwxr-xr-x root root dnsmasq drwxr-xr-x dnsmasq pdns hosts -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=996166 Tomáš Chvátal <tchvatal@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|Leap 42.1 |Leap 42.3 -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com