[nsd-users] logging error on /etc/nsd/nsd.log
Simon Deziel
simon at sdeziel.info
Sat Jun 18 19:06:43 UTC 2022
Please share the NSD config you are using, I'll try to reproduce locally.
On 2022-06-18 15:06, Mukul Shukla via nsd-users wrote:
> 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
>>
>
>
> _______________________________________________
> nsd-users mailing list
> nsd-users at lists.nlnetlabs.nl
> https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users
More information about the nsd-users
mailing list