diff --git a/install.sh b/install.sh index 17a870b..7953410 100755 --- a/install.sh +++ b/install.sh @@ -388,7 +388,6 @@ $(echo "$OIDC_KEY" | sed 's/^/ /') userinfo_signed_response_alg: "none" AUTHEOF $SUDO chmod 600 "$AUTHELIA_CONFIG" -$SUDO chown -R "$SVC_USER:$SVC_USER" "$AUTHELIA_DIR" # Clean up files from Authelia tar $SUDO rm -f "${AUTHELIA_DIR}/authelia.service" "${AUTHELIA_DIR}/config.template.yml" 2>/dev/null || true @@ -406,6 +405,9 @@ USERSDB $SUDO chmod 600 "${AUTHELIA_DIR}/users_database.yml" fi +# Ensure everything is owned by the service user +$SUDO chown -R "$SVC_USER:$SVC_USER" "$AUTHELIA_DIR" + # Create systemd service for Authelia $SUDO tee /etc/systemd/system/authelia.service > /dev/null << AUTHSVC [Unit]