Re: Permission error after upgrade to Debian Buster (10.2)

"Kaulkwappe" <[email protected]> Fri, 13 Dec 2019 13:18:21 +0100
Newsgroups gmane.network.dns.nsd.general
Message-ID <[email protected]>
--6767e822963fffdc3467e9637788c02bf0d7812636decd77e6fd712ff0b6fbfc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div style=3D"font-family: Arial; text-align: left; font-size: 14px; color:=
 #000000;">Unfortunately I still get this errors in NSD 4.1.26 on Debian Bu=
ster 10.2:</div><div style=3D"font-family: Arial; text-align: left; font-si=
ze: 14px; color: #000000;"><br></div><div style=3D"font-family: Arial; text=
-align: left; font-size: 14px; color: #000000;">1) Log file:</div><div styl=
e=3D"font-family: Arial; text-align: left; font-size: 14px; color: #000000;=
">&gt; error: Cannot open /var/log/nsd.log for appending (Permission denied=
), logging to std</div><div style=3D"font-family: Arial; text-align: left; =
font-size: 14px; color: #000000;"><br></div><div style=3D"font-family: Aria=
l; text-align: left; font-size: 14px; color: #000000;">When it se the owner=
 of nsd.log to root:root, I don't get an error message on start. However, a=
fter this start, NSD will change the owner to nsd:nsd and on the next start=
 I will get this error message.</div><div style=3D"font-family: Arial; text=
-align: left; font-size: 14px; color: #000000;"><br></div><div style=3D"fon=
t-family: Arial; text-align: left; font-size: 14px; color: #000000;">2) PID=
 file:</div><div style=3D"font-family: Arial; text-align: left; font-size: =
14px; color: #000000;">&gt;&nbsp;warning: failed to unlink pidfile /run/nsd=
/nsd.pid: Permission denied</div><div style=3D"font-family: Arial; text-ali=
gn: left; font-size: 14px; color: #000000;">It seems that NSD needs a PID f=
ile, because if I change pidfile: "/run/nsd/nsd.pid" to pidfile: "" I get:<=
/div><div style=3D"font-family: Arial; text-align: left; font-size: 14px; c=
olor: #000000;"><br></div><div style=3D"font-family: Arial; text-align: lef=
t; font-size: 14px; color: #000000;"><div>&gt; error: cannot open pidfile :=
 No such file or directory</div><div>&gt; error: cannot overwrite the pidfi=
le : No such file or directory</div><div><br></div><br><br><hr style=3D"bor=
der: 0; border-bottom: 1px solid #DADADA;"><b>From:</b> Jos=C3=A9Luis Artuc=
h &lt;<a href=3D"/email/new/1/zenbakaitz%40speedy.com.ar">zenbakaitz@speedy=
.com.ar</a>&gt;<br><b>Sent:</b> Tuesday, 26. Nov 2019 =E2=80=93 01:03  CET =
+0100<br><b>To:</b> Kaulkwappe &lt;<a href=3D"/email/new/1/kaulkwappe%40prv=
y.eu">[email protected]</a>&gt;<br><a href=3D"/email/new/1/nsd-users%40NLn=
etLabs.nl">[email protected]</a><br><br><b>Subject:</b> Re: [nsd-users=
] Permission error after upgrade to Debian Buster (10.2)<br><br></div><div>=
=0A=09=09=09=09=0A=09=09=09=09=09<style>=0A=09=09=09=09=09=09=0A=09=09=09=
=09=09=09body {=0A=09=09=09=09=09=09=09font-family: "Arial";=0A=09=09=09=09=
=09=09=09font-size: 100% !important;=0A=09=09=09=09=09=09=09margin: 0;=0A=
=09=09=09=09=09=09=09line-height: 1.2rem;=0A=09=09=09=09=09=09}=0A=09=09=09=
=09=09=09=0A=09=09=09=09=09</style>=0A=0A=09=09=09=09=09<pre style=3D"white=
-space: pre-wrap; color: #173860;">Hi Kaulkwappe,=0A=0AEl lun, 25-11-2019 a=
 las 01:34 +0100, Kaulkwappe escribi=C3=B3:=0A&gt; &gt; [...] I'd double ch=
eck if it's indeed effective with "systemctl=0A&gt; show nsd | grep ReadWri=
tePaths"=0A&gt; =0A&gt; Seems to be effective:=0A&gt; &gt; # systemctl show=
 nsd | grep ReadWritePaths=0A&gt; &gt; ReadWritePaths=3D/var/lib/nsd /var/l=
og /etc/nsd /run=0A&gt; =0A&gt; The problem with the log file will never st=
op the NSD service from=0A&gt; working (I believe) but the log file is quit=
e important, so, of=0A&gt; course, NSD should be able to append to it.=0A&g=
t; =0A&gt; Does anyone already had this problem after an upgrade?=0A&gt; =
=0A&gt; Kind Regards,=0A&gt; Kaulkwappe=0A&gt; =0A=0AMy knowledge on this s=
ubject is very limited, but since you ask I give=0Ayou my recent experience=
. I have also upgraded from Debian 9 to Debian=0A10, two ways, starting fro=
m Debian 9 and also from scratch. In both=0Acases I have not got NSD to wri=
te the log file. I have tested changes=0Aof permissions and/or routes.=0AHo=
wever, I have not had problems with the start of NSD, but I clarify=0Athat =
I use NSD with a very elementary configuration and without=0A/var/lib/nsd/z=
one.list defined.=0AA cordial greeting.=0AJos=C3=A9 Luis=0A=0A&gt; =0A&gt; =
From: Simon Deziel &lt;[email protected]&gt;=0A&gt; Sent: Monday, 25. Nov =
2019 =E2=80=93 01:26 CET +0100=0A&gt; To: [email protected]=0A&gt; =0A=
&gt; Subject: Re: [nsd-users] Permission error after upgrade to Debian=0A&g=
t; Buster (10.2)=0A&gt; =0A&gt; On 2019-11-24 6:10 p.m., Kaulkwappe wrote:=
=0A&gt; &gt; Hi Simon,=0A&gt; &gt; =0A&gt; &gt;  &gt; I would have expect a=
 permission error instead of a "read-only"=0A&gt; one. It=0A&gt; &gt;  &gt;=
 looks as if /var/log was not properly added to be ReadWritePaths=0A&gt; se=
t.=0A&gt; &gt; =0A&gt; &gt; That is what I have used:=0A&gt; &gt;  &gt; Rea=
dWritePaths=3D/var/lib/nsd /var/log /etc/nsd /run=0A&gt; =0A&gt; Not sure w=
hat would explain the read-only error then. I'd double=0A&gt; check=0A&gt; =
if it's indeed effective with "systemctl show nsd | grep=0A&gt; ReadWritePa=
ths"=0A&gt; =0A&gt; &gt;  &gt; This unlink failure is expected and AFAICT h=
armless.=0A&gt; &gt; It should be harmless, but it doesn't look nice. I wou=
ld consider=0A&gt; this as a bug.=0A&gt; =0A&gt; Agreed. Interestingly, unb=
ound accepts "-p" to skip managing its own=0A&gt; PID. If nsd could get thi=
s, it would be handy when managing the=0A&gt; daemon=0A&gt; with systemd.=
=0A&gt; =0A&gt; &gt;  &gt; I believe that xfrd.state should be owned by nsd=
:nsd as the=0A&gt; daemon needs=0A&gt; &gt;  &gt; to write to that file.=0A=
&gt; &gt; After changing the owner to nsd:nsd I believe this problem is=0A&=
gt; fixed. Thanks!=0A&gt; =0A&gt; Glad to hear that!=0A&gt; =0A&gt; Regards=
,=0A&gt; Simon=0A&gt; _______________________________________________=0A&gt=
; nsd-users mailing list=0A&gt; [email protected]=0A&gt; https://open.=
nlnetlabs.nl/mailman/listinfo/nsd-users=0A&gt; ____________________________=
___________________=0A&gt; nsd-users mailing list=0A&gt; nsd-users@NLnetLab=
s.nl=0A&gt; https://open.nlnetlabs.nl/mailman/listinfo/nsd-users=0A=0A</pre=
>=09=09=09=09=09=0A=09=09=09=09</div>


--6767e822963fffdc3467e9637788c02bf0d7812636decd77e6fd712ff0b6fbfc
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
nsd-users mailing list
[email protected]
https://open.nlnetlabs.nl/mailman/listinfo/nsd-users

--6767e822963fffdc3467e9637788c02bf0d7812636decd77e6fd712ff0b6fbfc--