> uname -a
OpenBSD [...] 7.7 GENERIC.MP#2 amd64

> nsd -v
NSD version 4.9.1

> man nsd.conf
...
chroot: <directory>
NSD will chroot on startup to the specified directory. Note that
if elsewhere in the configuration you specify an absolute pathname
to a file inside the chroot, you have to prepend the chroot path.
That way, you can switch the chroot option on and off without
having to modify anything else in the configuration. Set the value
to "" (the empty string) to disable the chroot. By default
"/var/nsd" is used. Same as command-line option -t.
...

> ls -hl /var/nsd/etc/nsd.conf
-rw-r--r--  1 root  wheel   2.3K Aug  4 13:11 /var/nsd/etc/nsd.conf

> doas grep chroot /var/nsd/etc/nsd.conf
[null]

> grep nsd /etc/rc.conf.local
nsd_flags=

> doas rcctl check nsd
nsd(ok)

> doas /usr/sbin/nsd-control reconfig
reconfig start, read /etc/nsd.conf
Could not open /etc/nsd.conf: Permission denied

Why is nsd-control failing to read /var/nsd/etc/nsd.conf?

Reply via email to