error: cannot open zonefile No such file or directory

George Thessalonikefs george at nlnetlabs.nl
Mon Apr 12 17:04:13 UTC 2021


Hi Mark,

I suppose you use the chroot option in your configuration file (enabled 
by default). That will prevent unbound from accessing files outside the 
configured chroot. Based on your policy you could:
- Disable chroot with chroot: "", or
- Bind mount the /opt/share/rpz location inside the chroot.

Best regards,
-- George

On 12/04/2021 16:41, Mark Abram via Unbound-users wrote:
> When all rpz zone files are located in unbound default dir they work 
> fine, however if I try to relocate them to a separate location unbound fails
> ​with error: cannot open zonefile /opt/share/rpz/rpz.urlhause.zone for 
> rpz.urlhause.abuse.ch.zone.: No such file or directory
> The new directory is created with chown nobody /opt/share/rpz and the 
> files so indeed exists in that location.
> ls -l /opt/share/rpz Do I need to do anyhting else to get these working 
> ? I like to keep rpz files separate from unbound default location.
>> ​-rwxrwxrwx    1 admin root           441 Apr 11 22:24 rpz-refresh
> -rw-rw-rw-    1 admin root           769 Apr 11 22:18 rpz.block.hosts.zone
> -rw-rw-rw-    1 admin root       2847590 Apr 11 22:18 rpz.stevenblack.zone
> -rw-rw-rw-    1 admin root           707 Apr 11 22:18 rpz.trend.micro.zone
> -rw-rw-rw-    1 admin root        125804 Apr 11 22:18 rpz.urlhause.zone
> -rw-rw-rw-    1 admin root           629 Apr 11 22:24 unbound.conf.rpz
>> 
> ​Mark
>


More information about the Unbound-users mailing list