Skip to content

steamcmd Linux installation fixes#3

Merged
et-nik merged 1 commit into
masterfrom
hotfix-steamcmd
May 16, 2026
Merged

steamcmd Linux installation fixes#3
et-nik merged 1 commit into
masterfrom
hotfix-steamcmd

Conversation

@et-nik
Copy link
Copy Markdown
Member

@et-nik et-nik commented May 16, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/groupShareTree in osowner plus a new Group option, with unix/windows build-constrained implementations and tests.
  • Updated installFromSteam to validate SteamCMDPath, group-share it for the su_user, and run steamcmd with WorkDir = SteamCMDPath, FallbackWorkDir = server.WorkDir, and HOME pointing at the steamcmd directory.
  • Extended the unix executor to propagate supplementary groups onto syscall.Credential and to upsert env entries (so a caller-supplied HOME is not duplicated/shadowed), plus README/config docs for steam_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.

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 25963657544

Coverage decreased (-0.2%) to 36.215%

Details

  • Coverage decreased (-0.2%) from the base build.
  • Patch coverage: 105 uncovered changes across 4 files (20 of 125 lines covered, 16.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
internal/app/components/executor_unix.go 40 0 0.0%
internal/app/osowner/owner_unix.go 28 0 0.0%
internal/app/osowner/owner.go 37 10 27.03%
internal/app/game_server_commands/install_server.go 20 10 50.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 12782
Covered Lines: 4629
Line Coverage: 36.21%
Coverage Strength: 23645.54 hits per line

💛 - Coveralls

@et-nik et-nik merged commit ff923eb into master May 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants