[nsd-users] logging error on /etc/nsd/nsd.log

Mukul Shukla mukulmanet at gmail.com
Sat Jun 18 19:06:15 UTC 2022


I did not work.
Same error


On Sat, Jun 18, 2022 at 11:14 PM Simon Deziel via nsd-users <
nsd-users at lists.nlnetlabs.nl> wrote:

> Hi Mukul,
>
> On 2022-06-18 11:21, Mukul Shukla via nsd-users wrote:
> > Dear All,
> >
> > I have recently shifted my Authoritative DNS server from very old TinyDNS
> > to NSD. Presently it is in a very primitive stage, but  working
> absolutely
> > fine.
> >
> > I have installed NSD on Debian Testing because I could find a relatively
> > newer version of NSD on Debian Testing. I am running the NSD version
> 4.5.0.
> > I am enabling the NSD logging  to /var/log/nsd.log. When I check the
> status
> > of the NSD demon by "systemctl status nsd", I get the following error
> > message.
> >
> > Jun 18 20:39:02 ns1 systemd[1]: Starting Name Server Daemon...
> > Jun 18 20:39:02 ns1 nsd[1884]: [2022-06-18 20:39:02.460] nsd[1884]:
> error:
> > Cannot open /var/log/nsd.log for appending (Permission denied), logging
> to
> > stderr
> > Jun 18 20:39:02 ns1 nsd[1884]: [2022-06-18 20:39:02.460] nsd[1884]:
> > warning: chown /var/log/nsd.log failed: Read-only file system
>
> The systemd unit shipped by Debian assumes default logging to syslog. As
> such, the systemd unit needs to be edit if you want file logging:
>
>    sudo systemctl edit nsd # will open $EDITOR
>
> Then put the following and save:
>
>    # Allow file logging to dedicated dir
>    ReadWritePaths=/var/log/nsd
>
> And create the directory and restart NSD:
>
>    sudo mkdir /var/log/nsd
>    sudo chown nsd: /var/log/nsd
>    sudo systemctl restart nsd
>
>
> The above has NSD log to a subdirectory as it is safer than granting
> write access to all /var/log.
>
> HTH,
> Simon
> _______________________________________________
> nsd-users mailing list
> nsd-users at lists.nlnetlabs.nl
> https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/nsd-users/attachments/20220619/da5e0a77/attachment-0001.htm>


More information about the nsd-users mailing list