zomboid-dedicated-server
zomboid-dedicated-server copied to clipboard
Fix steamcmd SEGFAULT without running the server as root
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.
SonarCloud Quality Gate failed.
0 Bugs
0 Vulnerabilities
1 Security Hotspot
0 Code Smells
No Coverage information
0.0% Duplication