Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix steamcmd SEGFAULT without running the server as root #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

super-cooper
Copy link

@super-cooper super-cooper commented Jun 4, 2023

Resolves an issue with steamcmd.sh encountering a SEGFAULT when running as a non-root user. The server is installed, updated, and managed by the root user, but ownership of the server's files are always relinquished back to the steam user after they are created or modified.

This is more of a band-aid solution, as it would definitely be better to rework the image in such a way that it is not a requirement to constantly chown files back to the steam user, and also to not run anything as root, but I figure this is a serviceable and minimally-invasive solution to get the image working for now.

The change modifies the image to be based off of the root variant of the steamcmd-minimal image, and then creates a steam user manually in the Dockerfile. The run_server.sh script is run as root, but the command to run the server is done as the steam user. As mentioned above, whenever files required by the server are created or modified (as root) by run_server.sh, their ownership is transferred back to the steam user.

Resolves an issue with steamcmd.sh encountering a SEGFAULT when running
as a non-root user. The server is installed, updated, and managed by the
root user, but ownership of the server's files are always relinquished
back to the steam user after they are created or modified.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 4, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

1 participant