Linuxgsm: Add override to run linuxgsm.sh as root inside dedicated container isolations

Created on 10 Mar 2018  路  6Comments  路  Source: GameServerManagers/LinuxGSM

As the title suggests, the linuxgsm.sh script should have a command-line parameter allowing to override the root checks and run the script as root.
When using container isolation like Docker it only serves to complicate the image build by requiring a diff patch processed in the build to ignore the root checks or adding the files core_functions.sh and check_root.sh to bypass which is messier with artifacts.

This also requires that the script it downloads for a specific game also be adjusted to avoid root checks.

All 6 comments

Hi,

Well, I'm not so sure about this one. Is it that hard to run LinuxGSM as a user in a container? (not using them so...)
Containers are unsupported at the moment, so maybe this is something to consider if they become supported at some point.

Whatever the case, it sounds like a bad idea to run any game server as root.

It is possible, but it's not the usual configuration with docker containers because it just adds extra work in building the image with extra artifacts, to an already isolated environment.
Whether root or not, your limited to changes in the container, to files that the user it ran under would need anyway.
I'm not proposing that this be the default, but a simple parameter to disable the checks would be beneficial whether it's "ideal" or not.

Well, I think it would give bad ideas to noobs having this as an option. But since you know what you're doing, you can just edit these lines to bypass the check for LinuxGSM (should be enough, though I'm not 100% sure since I didn't test):
https://github.com/GameServerManagers/LinuxGSM/blob/master/linuxgsm.sh#L257-L266
And this file for game servers:
https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/check_root.sh

I had a big long rant about how people should be smarter if they're going to administrate systems, and how I don't like being chopped off at the knees because "noobs might use it". Suffice to say I see resistance to a very basic, unobtrusive feature request. This spells EOL on this product, so thanks for your time, I'll move on.

Says the dude who won't bother creating and using a user on his container. We had a hard time teaching people that root should be used cautiously, not to waste all these efforts with one nuts feature.

BTW
https://github.com/GameServerManagers/LinuxGSM-docker

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MicLieg picture MicLieg  路  3Comments

n0x-io picture n0x-io  路  3Comments

pavelhoral picture pavelhoral  路  3Comments

Bourne-ID picture Bourne-ID  路  3Comments

YannKr picture YannKr  路  3Comments