From cd6cdba1bf8cff15d3df4c8fd7b1b7a867f0e91a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 8 Dec 2016 07:59:58 +0100 Subject: [PATCH] dnsmasq: work around unclear permission situation on hosts file --- src/etc/inc/plugins.inc.d/dnsmasq.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/etc/inc/plugins.inc.d/dnsmasq.inc b/src/etc/inc/plugins.inc.d/dnsmasq.inc index 6a61dcdc7..34a1df20f 100644 --- a/src/etc/inc/plugins.inc.d/dnsmasq.inc +++ b/src/etc/inc/plugins.inc.d/dnsmasq.inc @@ -268,6 +268,13 @@ function _dnsmasq_add_host_entries() } else { file_put_contents('/var/etc/dnsmasq-hosts', $lhosts . $dhosts); } + + /* + * Several reports indicated 600 permissions on this file. + * The reason is currently unknown, but setting it to 644 + * as it should be brings the service back to life. + */ + chmod('/var/etc/dnsmasq-hosts', 0644); } function _dnsmasq_dhcpleases_start()