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

Processes and Folders always belong to the default user #92

Open
TAINCER opened this issue Dec 17, 2020 · 1 comment
Open

Processes and Folders always belong to the default user #92

TAINCER opened this issue Dec 17, 2020 · 1 comment

Comments

@TAINCER
Copy link

TAINCER commented Dec 17, 2020

Behaviour

Docker should use the specified user with the group in the .env file, but it's always 1000 (default)

Steps to reproduce this issue

  1. use the docker-compose.yml and .env file from the example in the Repository.
  2. Change the PID and GID Values to another user on the Host system.
  3. Change the version to 2.4 and change the Ports accordingly.
  4. The folders and processes are owned by the wrong user (PUIDand PGID1000)

Configuration

  • Debian 10 64 bit
  • Docker version 20.10.1, build 831ebea
  • Changed the example docker-compose.yml to version 2.4, to use cpuset.

docker-compose.yml:

version: "2.4"

services:
  csgo:
    image: crazymax/csgo-server-launcher:latest
    container_name: csgo0
    cpuset: "0"
    ports:
      - "${PORT}:${PORT}/tcp"
      - "${PORT}:${PORT}/udp"
      - "${TV_PORT}:${TV_PORT}/tcp"
      - "${TV_PORT}:${TV_PORT}/udp"
    env_file:
      - "./.env"
    volumes:
      - "/home/${GAME_USERNAME}/csgo:/var/steamcmd/games/csgo"
      - "./steam:/home/steam/Steam"
    tty: true
    ulimits:
      nproc: 65535
      nofile:
        soft: 32000
        hard: 40000
    restart: always

.env:

TZ=Europe/Berlin
PUID=1001
PGID=1001
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_TLS=on
SMTP_STARTTLS=on
SMTP_TLS_CHECKCERT=on
SMTP_AUTH=on
SMTP_USER=foo
SMTP_PASSWORD_FILE=bar
SMTP_FROM=foo@gmail.com
SMTP_DOMAIN=localhost

GAME_USERNAME=cs1

PORT=27015
TV_PORT=27020
GSLT=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
STEAM_LOGIN=anonymous
STEAM_PASSWORD=anonymous
UPDATE_EMAIL=
UPDATE_RETRY=3
CLEAR_DOWNLOAD_CACHE=0
API_AUTHORIZATION_KEY=
WORKSHOP_COLLECTION_ID=125499818
WORKSHOP_START_MAP=125488374
MAXPLAYERS=12
TICKRATE=128
EXTRAPARAMS=+sv_pure 1 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 +tv_port 27020

cs1 user:

uid=1001(cs1) gid=1001(cs1) groups=1001(cs1),1002(ftpuser)

Logs

Setting timezone to Europe/Berlin...
Checking if steam UID / GID has changed...
usermod: user steam is currently used by process 1
groupmod: Permission denied.
groupmod: cannot lock /etc/group; try again later.
NOTICE: UPDATE_EMAIL is not set
Setting msmtp configuration...
/entrypoint.sh: line 20: bar: No such file or directory
Fixing permissions...
Starting csgo...
NOTICE: /var/steamcmd/games/csgo/srcds_run does not exist or is not executable.
steamcmd already exists...
Updating csgo...
/var/steamcmd/games/csgo/csgo/logs does not exist, creating...
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".

After that comes the SteamCMD download, login, and CS:GO Download, there is nothing special there.

Screenshots:

The created csgo server folder:
image

The running processes: (while steamcmd was downloading, the same user when the server is running)
image

@stale stale bot added the 💀 stale label Jan 16, 2021
Repository owner deleted a comment from stale bot Jun 9, 2021
@netr0m
Copy link

netr0m commented Aug 3, 2021

@crazy-max From a quick glance, this seems to relate to the following line(s): in the Dockerfile?

RUN groupadd -f -g 1000 steam \
  && useradd -o --shell /bin/bash -u 1000 -g 1000 -m steam \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants