<div dir="ltr"><div>After doing the above steps, I have modified the nsd.conf to have a line:</div><div>logfile: "/var/log/nsd/nsd.log"<br></div><div>It gives the same error.</div><div><br></div><div>My wild guess is that the /var and /var/log has no write permission for nsd user.</div><div>So, even if I point the log file to /var/log/nsd/nsd.conf, it's the same thing as default pointing to /var/log/nsd.conf.</div><div><br></div><div>I think,just to make Debian able to write logs to a file is a big issue. Better to shift to another distribution,</div><div>Can anybody confirm if this is not an issue on Centos or OpenBSD?</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 19, 2022 at 12:36 AM Simon Deziel via nsd-users <<a href="mailto:nsd-users@lists.nlnetlabs.nl">nsd-users@lists.nlnetlabs.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Please share the NSD config you are using, I'll try to reproduce locally.<br>
<br>
On 2022-06-18 15:06, Mukul Shukla via nsd-users wrote:<br>
> I did not work.<br>
> Same error<br>
> <br>
> <br>
> On Sat, Jun 18, 2022 at 11:14 PM Simon Deziel via nsd-users <<br>
> <a href="mailto:nsd-users@lists.nlnetlabs.nl" target="_blank">nsd-users@lists.nlnetlabs.nl</a>> wrote:<br>
> <br>
>> Hi Mukul,<br>
>><br>
>> On 2022-06-18 11:21, Mukul Shukla via nsd-users wrote:<br>
>>> Dear All,<br>
>>><br>
>>> I have recently shifted my Authoritative DNS server from very old TinyDNS<br>
>>> to NSD. Presently it is in a very primitive stage, but working<br>
>> absolutely<br>
>>> fine.<br>
>>><br>
>>> I have installed NSD on Debian Testing because I could find a relatively<br>
>>> newer version of NSD on Debian Testing. I am running the NSD version<br>
>> 4.5.0.<br>
>>> I am enabling the NSD logging to /var/log/nsd.log. When I check the<br>
>> status<br>
>>> of the NSD demon by "systemctl status nsd", I get the following error<br>
>>> message.<br>
>>><br>
>>> Jun 18 20:39:02 ns1 systemd[1]: Starting Name Server Daemon...<br>
>>> Jun 18 20:39:02 ns1 nsd[1884]: [2022-06-18 20:39:02.460] nsd[1884]:<br>
>> error:<br>
>>> Cannot open /var/log/nsd.log for appending (Permission denied), logging<br>
>> to<br>
>>> stderr<br>
>>> Jun 18 20:39:02 ns1 nsd[1884]: [2022-06-18 20:39:02.460] nsd[1884]:<br>
>>> warning: chown /var/log/nsd.log failed: Read-only file system<br>
>><br>
>> The systemd unit shipped by Debian assumes default logging to syslog. As<br>
>> such, the systemd unit needs to be edit if you want file logging:<br>
>><br>
>> sudo systemctl edit nsd # will open $EDITOR<br>
>><br>
>> Then put the following and save:<br>
>><br>
>> # Allow file logging to dedicated dir<br>
>> ReadWritePaths=/var/log/nsd<br>
>><br>
>> And create the directory and restart NSD:<br>
>><br>
>> sudo mkdir /var/log/nsd<br>
>> sudo chown nsd: /var/log/nsd<br>
>> sudo systemctl restart nsd<br>
>><br>
>><br>
>> The above has NSD log to a subdirectory as it is safer than granting<br>
>> write access to all /var/log.<br>
>><br>
>> HTH,<br>
>> Simon<br>
>> _______________________________________________<br>
>> nsd-users mailing list<br>
>> <a href="mailto:nsd-users@lists.nlnetlabs.nl" target="_blank">nsd-users@lists.nlnetlabs.nl</a><br>
>> <a href="https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users" rel="noreferrer" target="_blank">https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users</a><br>
>><br>
> <br>
> <br>
> _______________________________________________<br>
> nsd-users mailing list<br>
> <a href="mailto:nsd-users@lists.nlnetlabs.nl" target="_blank">nsd-users@lists.nlnetlabs.nl</a><br>
> <a href="https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users" rel="noreferrer" target="_blank">https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users</a><br>
<br>
_______________________________________________<br>
nsd-users mailing list<br>
<a href="mailto:nsd-users@lists.nlnetlabs.nl" target="_blank">nsd-users@lists.nlnetlabs.nl</a><br>
<a href="https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users" rel="noreferrer" target="_blank">https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users</a><br>
</blockquote></div>