Hi,

With 'User=www-data' and 'Group=www-data' in `/lib/systemd/system/caddy.service`
does `caddy` start.  But that local modification will be overwritten
upon upgrades (and re-installs).

Having a group 'caddy' and a user 'caddy' is a better solution.

What I did:

|stappers@hop:~
|$ sudo addgroup --system caddy
|Adding group `caddy' (GID 119) ...
|Done.
|stappers@hop:~
|$

|stappers@hop:~
|$ sudo adduser --system --home /var/www --shell /usr/sbin/nologin 
--no-create-home --ingroup caddy caddy
|Warning: The home dir /var/www you specified can't be accessed: No such file 
or directory
|Adding system user `caddy' (UID 109) ...
|Adding new user `caddy' (UID 109) with group `caddy' ...
|Not creating home directory `/var/www'.
|stappers@hop:~
|$ 


Comparing the result with 'www-data'

|stappers@hop:~
|$ grep -e www-data -e caddy /etc/passwd
|www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
|caddy:x:109:119::/var/www:/usr/sbin/nologin
|stappers@hop:~
|$ 

 

Please consider to add

  addgroup --system caddy
  adduser --system --home /var/www --shell /usr/sbin/nologin --no-create-home 
--ingroup caddy caddy

to the maintainer scripts.


Groeten
Geert Stappers
-- 
Silence is hard to parse

Reply via email to