I’m trying to test Caddy as a replacement for nginx on a Debian 9 (stretch) system. I’ve followed the instructions at https://github.com/caddyserver/caddy/tree/master/dist/init/linux-systemd up to a prick, /etc/caddy/Caddyfile is
-rw-r--r-- 1 root root, cadyy runs as user www-data (well, should run, but should be no problem, because nginx runs successful as www-data).
Despite all this, starting the service fails with the error message:
loading Caddyfile via flag: open /etc/caddy/Caddyfile: permission denied
Ironically, running caddy from the command line works fine. I’ve tried to chown the Caddyfile to user www-data, and even setting it to 666, but it’s always the same.
What could I try to change for letting the caddy.service work?