Files
datastore/programs/install
Alexey Milovidov f0347457c1 Address review: only apply --group when explicitly specified
`--group` for `clickhouse start` / `restart` had a default value of
`clickhouse` purely for documentation. The launcher applied it
unconditionally on the `sudo` path, so

    clickhouse start --user alice

was silently expanded to `sudo --preserve-env -u alice -g clickhouse ...`.
That fails when `alice` is not a member of the `clickhouse` group,
which is a behavior regression for users who only ever passed `--user`.

Clear `group` in `mainEntryClickHouseStart` and `mainEntryClickHouseRestart`
when `options["group"].defaulted()` is true, so the default is shown in
`--help` but not applied to the spawned server. The `no-sudo` path then
runs `clickhouse su user:`, where `setUserAndGroup` falls back to the
user's primary group.
2026-05-01 03:50:59 +00:00
..