fix(installer): chown authelia dir AFTER users_database.yml is written

This commit is contained in:
Claus Lohmar 2026-06-14 16:58:26 +00:00
parent 101009c872
commit 5953736ddb

View file

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