GameServerManagers / GameServerManagers/LinuxGSM

[Bug]: check_permissions enforces ownership of folders

Open
#4,323 1 comment 0 reactions 0 assignees View on GitHub
command: install command: update distro: Debian distro: Ubuntu info: docker type: bug
Dominant language
Shell
Stars
4.9k
Forks
864
PR merge metrics
No merged PRs in 30d

Description

### User story

As a user, I might not want to make the LGSM user owner of the LGSM_SERVERFILES directory, but only give it sufficient permissions using group

### Game

Garrys Mod

### Linux distro

Ubuntu 22.04, Ubuntu 20.04, Ubuntu 18.04, Ubuntu 16.04, Debian 12, Debian 11, Debian 10, Debian 9, RedHat 9, RedHat 8, RedHat 7

### Command

command: update, command: install

### Further information

I'm running a container that uses lgsm within a docker cluster. The server files directory is mounted as a volume to decrease server reboot time. Local-Path docker volumes currently don't support (automatically) setting the owner of the volume mount directory, but only setting the group. However, check_permissions still requires, that the owner of the server files directory is the active user. Currently I can work around this by nesting the server files directory in another directory. As lgsm will create this directory on demand, it will also be the owner of it.

### Relevant log output

```shell
[ FAIL ] Updating LinuxGSM gmodserver: Ownership issues found
Information! The current user (steam) does not have ownership of the following files:
tee: /home/steam/log/script/gmodserver-script.log: No such file or directory
User Group File
root steam /home/steam/serverfiles
Information! please see https://docs.linuxgsm.com/support/faq#fail-starting-game-server-permission-issues-found
```

### Steps to reproduce

1. create a directory, where the owner is another user, e.g. root
2. allow the current user (e.g. steam) to use the directory by adding setting their group
3. set `LGSM_SERVERFILES` to the path of the directory
4. try to run lgsm install or update

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.