Writing unbound logs to USB stick

using pihole & unbound on Rpi3-B+. i had configured unbound to write logs to /var/log/unbound, verbosity: 2. the logs gets rather large so i put in a USB stick formatted with ext4 and changed unbound config to put its log files there. but i’m getting errors when unbound attempts to write to USB stick:

syslog:: unbound[816]: [1561052647] unbound[816:0] error: Could not open logfile /mnt/USB1/log/unbound.log: Permission denied

the perms on /mnt/USB1/log is:

Access: (0770/drwxrwx—) Uid: ( 0/ root) Gid: ( 112/ unbound)

unbound group has perms to write there, so how can i get unbound to actually write to the USB stick and stop this error?

Here, @DL6ER has described a method to move the pihole logs to another location, using symbolic links. I’m sure this method can be modified to “relocate” the unbound logs to your USB stick

In this topic, a configuration is described to modify the unbound verbosity, without restaring unbound (sudo /usr/sbin/unbound-control verbosity x). You could set the loglevel to 0, and increase it at runtime, using the above command, when needed.

thanks for the links/help && apologies for getting back so late!! this looks like just what i’m looking for.

i changed perms to unbound.unbound /var/log/unbound and /mnt/USB1/log/unbound and added the symbolic link. it’s writing to usb now.

somewhere along the line i suspect i messed about with perms on /var/log/unbound to something incorrect. made those same perms to the usb stick folder so neither were being allowed write. for now that’s what i think was happening.

thanks again, your links helped.