Debugging a strange permission issue on Unbound

  • Posted on
  • 5 mins read

I recently upgraded a VM from Debian 9 to Debian 10 and found myself unable to start Unbound.

This is not uncommon when “dist-upgrading” and my experience told me it would probably not be a big deal, but the error message was quite a surprise:

unbound[429:0] error: Could not open /etc/unbound/unbound.conf: Permission denied
unbound[429:0] fatal error: Could not read config file: /etc/unbound/unbound.conf. Maybe try unbound -dd, it stays on the commandline to see more errors, or unbound-checkconf

Let’s see what the permissions are on that file:

# ls -ld /etc /etc/unbound /etc/unbound/unbound.conf
drwxr-xr-x 93 root    root    4096 Jun  4 14:22 /etc
drwxr-x---  3 unbound unbound 4096 May 29 06:03 /etc/unbound
-rw-r-----  1 unbound unbound   94 May 17 02:10 /etc/unbound/unbound.conf

Ok, that’s strange!

How to install Netbox with Apache and uWSGI

  • Posted on
  • 4 mins read

Netbox is an IPAM and DCIM tool written by Jeremy Stretch1 for the DigitalOcean’s needs.

It was released in June 2016, and has since become (in my opinion) the best FLOSS tool to manage your inventory of network devices, servers, IP addresses and their interconnections2.

Here I’ll describe how to install Netbox using uWSGI and Apache mod_proxy_uwsgi on Debian3. I won’t cover what Netbox’s documentation already does (Netbox’s code or PostgreSQL installation and configuration for instance), I’ll assume that you already followed the official documentation to download Netbox, install its dependencies and configure everything (tip: the script at the root of the repository does all this for you).

If you only want to get the configuration files and avoid reading all the crap I write, you can look at this Github Gist I made a few month ago.