From e2635666730e24bfbc2408811be089502338cbc4 Mon Sep 17 00:00:00 2001 From: smlx Date: Wed, 20 Jun 2018 01:15:38 +1000 Subject: [PATCH] init: Fix configuration permissions in systemd integration. (#2130) This fixes the permissions on /etc/caddy to match standard linux permissions for /etc, and makes the Caddyfile read-only for the caddy user. --- dist/init/linux-systemd/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/init/linux-systemd/README.md b/dist/init/linux-systemd/README.md index be548ae4..49cafc7b 100644 --- a/dist/init/linux-systemd/README.md +++ b/dist/init/linux-systemd/README.md @@ -44,7 +44,7 @@ sudo useradd \ --system --uid 33 www-data sudo mkdir /etc/caddy -sudo chown -R root:www-data /etc/caddy +sudo chown -R root:root /etc/caddy sudo mkdir /etc/ssl/caddy sudo chown -R root:www-data /etc/ssl/caddy sudo chmod 0770 /etc/ssl/caddy @@ -55,8 +55,8 @@ and give it appropriate ownership and permissions: ```bash sudo cp /path/to/Caddyfile /etc/caddy/ -sudo chown www-data:www-data /etc/caddy/Caddyfile -sudo chmod 444 /etc/caddy/Caddyfile +sudo chown root:root /etc/caddy/Caddyfile +sudo chmod 644 /etc/caddy/Caddyfile ``` Create the home directory for the server and give it appropriate ownership