fix(installer): chown -R entire /opt/ directories to service user

This commit is contained in:
Claus Lohmar 2026-06-14 16:52:11 +00:00
parent 4ac067e91d
commit 101009c872

View file

@ -249,8 +249,7 @@ session:
expiry_minutes: 60 expiry_minutes: 60
CONFIGEOF CONFIGEOF
$SUDO chmod 600 "$CONFIG_FILE" $SUDO chmod 600 "$CONFIG_FILE"
$SUDO chown "$SVC_USER:$SVC_USER" "$CONFIG_FILE" $SUDO chown -R "$SVC_USER:$SVC_USER" "$INSTALL_DIR"
$SUDO chown -R "$SVC_USER:$SVC_USER" "$DATA_DIR"
success "Config: $CONFIG_FILE" success "Config: $CONFIG_FILE"
# ============================================================ # ============================================================
@ -389,7 +388,7 @@ $(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 "$SVC_USER:$SVC_USER" "$AUTHELIA_CONFIG" "${AUTHELIA_DIR}/users_database.yml" "${AUTHELIA_DIR}/db.sqlite3" 2>/dev/null || true $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