<div dir="ltr"><div>I did not work.</div><div>Same error</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 18, 2022 at 11:14 PM 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">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 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 4.5.0.<br>
> I am enabling the NSD logging to /var/log/nsd.log. When I check the 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]: error:<br>
> Cannot open /var/log/nsd.log for appending (Permission denied), logging 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>
</blockquote></div>