steamcmd Linux installation fixes#3
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes Linux installation issues with steamcmd by ensuring that, when the daemon runs as root but executes steamcmd under an unprivileged su_user, steamcmd can still self-update and write into its own directory. It introduces a new osowner.ApplyGroupSharedRecursive helper that applies setgid + group rwx/rw to a shared directory, wires it into the steam install path, configures the executor to run with the right working directory and HOME, and preserves supplementary groups in the dropped-privilege child.
Changes:
- Added
ApplyGroupSharedRecursive/groupShareTreeinosownerplus a newGroupoption, with unix/windows build-constrained implementations and tests. - Updated
installFromSteamto validateSteamCMDPath, group-share it for thesu_user, and run steamcmd withWorkDir = SteamCMDPath,FallbackWorkDir = server.WorkDir, andHOMEpointing at the steamcmd directory. - Extended the unix executor to propagate supplementary groups onto
syscall.Credentialand to upsert env entries (so a caller-suppliedHOMEis not duplicated/shadowed), plus README/config docs forsteam_config.group.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents new steamcmd_path / steam_config.group settings and the setgid/group-sharing behavior. |
| internal/app/config/config.go | Adds Group field to SteamConfig for the shared OS group. |
| internal/app/osowner/owner.go | New Group option, resolveGroupID, and ApplyGroupSharedRecursive helper. |
| internal/app/osowner/owner_unix.go | Unix implementation of groupShareTree (setgid + group bits, chown group only). |
| internal/app/osowner/owner_windows.go | Windows no-op stub for groupShareTree. |
| internal/app/osowner/owner_test.go | Tests for noop and root-mode behavior of ApplyGroupSharedRecursive. |
| internal/app/game_server_commands/install_server.go | Validates SteamCMD path, applies group-share, sets WorkDir/FallbackWorkDir/HOME for steamcmd. |
| internal/app/game_server_commands/install_server_test.go | Updates steam install/update tests to use SteamCMDPath and assert executor options. |
| internal/app/components/executor_unix.go | Sets supplementary groups on the credential and upserts caller-supplied env (notably HOME). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage Report for CI Build 25963657544Coverage decreased (-0.2%) to 36.215%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
No description provided.