wolveix / satisfactory-server

A Dockerized version of the Satisfactory dedicated server
https://hub.docker.com/r/wolveix/satisfactory-server
MIT License
1.26k stars 140 forks source link

Insufficient write permissions for /config #357

Open JohnnyTendo opened 23 hours ago

JohnnyTendo commented 23 hours ago

Experiencing issues? Check our Troubleshooting FAQ wiki!

Describe the Bug

I'm trying to start the satisfactory-server container by using the provided docker-compose.yml. After running the docker-compose up command, the container gets stuck in a restart loop. After running the container without the detached flag (docker-compose up) I got the log output below. The init.sh script exits after checking for write permissions on the /config dir, which is missing. The container itself reports that it is in a healthy state (I'm using portainer to monitor and orchestrate my containers). I tried several different attempts with slight modifications of the mounted volume (tested every change by itself but also every possible combination):

Your Runtime Command or Docker Compose File

services:
  satisfactory-server:
    container_name: 'satisfactory-server'
    hostname: 'satisfactory-server'
    image: 'wolveix/satisfactory-server:latest'
    ports:
      - '7777:7777/udp'
      - '7777:7777/tcp'
    volumes:
      - '/srv/satisfactory-server/config:/config'
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_default
      - traefik.port=7777
    environment:
      - MAXPLAYERS=4
      - PGID=1000
      - PUID=1000
      - ROOTLESS=true
      - STEAMBETA=false
      - DEBUG=false
    restart: unless-stopped
    healthcheck:
      test: [ "CMD", "bash", "/healthcheck.sh" ]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 120s
    deploy:
      resources:
        limits:
          memory: 6G
        reservations:
          memory: 4G

Debug Output

satisfactory-server    | ===== Satisfactory Server 1.8.7 =====
satisfactory-server    | https://github.com/wolveix/satisfactory-server
satisfactory-server    | 
satisfactory-server    | Debugging enabled (the container will exit after printing the debug info)
satisfactory-server    | 
satisfactory-server    | Printing environment variables:
satisfactory-server    | declare -x AUTOSAVENUM="5"
satisfactory-server    | declare -x DEBUG="true"
satisfactory-server    | declare -x DISABLESEASONALEVENTS="false"
satisfactory-server    | declare -x GAMECONFIGDIR="/config/gamefiles/FactoryGame/Saved"
satisfactory-server    | declare -x GAMESAVESDIR="/home/steam/.config/Epic/FactoryGame/Saved/SaveGames"
satisfactory-server    | declare -x HOME="/home/steam"
satisfactory-server    | declare -x HOSTNAME="satisfactory-server"
satisfactory-server    | declare -x LANG="en_US.UTF-8"
satisfactory-server    | declare -x LANGUAGE="en_US:en"
satisfactory-server    | declare -x LOG="false"
satisfactory-server    | declare -x MAXOBJECTS="2162688"
satisfactory-server    | declare -x MAXPLAYERS="4"
satisfactory-server    | declare -x MAXTICKRATE="30"
satisfactory-server    | declare -x OLDPWD
satisfactory-server    | declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
satisfactory-server    | declare -x PGID="1000"
satisfactory-server    | declare -x PUID="1000"
satisfactory-server    | declare -x PWD="/config"
satisfactory-server    | declare -x ROOTLESS="true"
satisfactory-server    | declare -x SERVERGAMEPORT="7777"
satisfactory-server    | declare -x SERVERSTREAMING="true"
satisfactory-server    | declare -x SHLVL="1"
satisfactory-server    | declare -x SKIPUPDATE="false"
satisfactory-server    | declare -x STEAMAPPID="1690800"
satisfactory-server    | declare -x STEAMBETA="false"
satisfactory-server    | declare -x TIMEOUT="30"
satisfactory-server    | declare -x USER="steam"
satisfactory-server    | declare -x VERSION="1.8.7"
satisfactory-server    | declare -x VMOVERRIDE="false"
satisfactory-server    | 
satisfactory-server    | System info:
satisfactory-server    | OS:  Linux satisfactory-server 3.10.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 x86_64 x86_64 GNU/Linux
satisfactory-server    | CPU: AMD EPYC 7452 32-Core Processor
satisfactory-server    | RAM: 11GB/16GB
satisfactory-server    | HDD: 22GB/300GB (8% used)
satisfactory-server    | 
satisfactory-server    | Current version:
satisfactory-server    | 1.8.7
satisfactory-server    | Current user:
satisfactory-server    | uid=0(root) gid=0(root) groups=0(root)
satisfactory-server    | Proposed user:
satisfactory-server    | uid=1000(?) gid=1000(?) groups=1000(?)
satisfactory-server    | 
satisfactory-server    | Exiting...

System Specs (please complete the following information):

===== START ISSUE REPORT =====
OS:  Linux [myProvider].net 3.10.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 x86_64 x86_64 GNU/Linux
CPU: AMD EPYC 7452 32-Core Processor
RAM: 10GB/16GB
HDD: 22GB/300GB (8% used)
===== END ISSUE REPORT =====

Logs

satisfactory-server    | ===== Satisfactory Server 1.8.7 =====
satisfactory-server    | https://github.com/wolveix/satisfactory-server
satisfactory-server    | 
satisfactory-server    | Checking available memory: 15GB detected
satisfactory-server    | Clearing old Satisfactory logs (set LOG=true to disable this)
satisfactory-server    | The current user does not have write permissions for /config

Additional Context

I already tried using a clone of the repo and it's dockerfile, to overwrite the init.sh and also to bypass it completely, to manually start it while being attached to the container. While being attached to the container, I can freely write to the /config dir with the steam user specified in the init.sh.

EDIT: I initaly wrote 'chown 777 config' in the description, which of course, doesn't make any sense. I meant 'chmod 777 config'

wolveix commented 23 hours ago

Hey! So to be clear, your host system's user with the user and group ID of 1000 have complete write access to /srv/satisfactory-server/config?

JohnnyTendo commented 23 hours ago

Yes the user I'm using for docker containers does have write permissions to /srv/satisfactory-server/config. @____ is my host system

[docker@____ config]$ id
uid=1000(docker) gid=1000(docker) Gruppen=1000(docker),10(wheel)
[docker@____ config]$ pwd
/srv/satisfactory-server/config
[docker@____ config]$ ls -alu
drwxrwxrwx 2 docker docker 4096  9. Okt 08:08 .
drwxr-xr-x 8 root   root   4096  8. Okt 15:15 ..
[docker@____ config]$ touch fooBarz
[docker@____ config]$ ls -alu
drwxrwxrwx 2 docker docker 4096  9. Okt 08:09 .
drwxr-xr-x 8 root   root   4096  8. Okt 15:15 ..
-rw-rw-r-- 1 docker docker    0  9. Okt 08:09 fooBarz