satisfactory-server: Can't start - Permission denied

Describe the Bug I just entered the command from the README.md (see below - only changed the path) and the container stops right away. (+ same when using the docker-compose.yml file)

Your Runtime Command or Docker Compose File docker run -d --name=satisfactory-server -h satisfactory-server -v $(pwd)/config:/config -p 7777:7777/udp -p 15000:15000/udp -p 15777:15777/udp wolveix/satisfactory-server:latest

System Specs:

  • OS: Debian GNU/Linux 10 (buster)

Additional Context Log:

mkdir: cannot create directory '/config/backups': Permission denied,
mkdir: cannot create directory '/config/gamefiles': Permission denied,
mkdir: cannot create directory '/config/saves': Permission denied,
mkdir: cannot create directory '/config/gamefiles': Permission denied,
mkdir: cannot create directory '/config/gamefiles': Permission denied,
mkdir: cannot create directory '/config/gamefiles': Permission denied

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 73 (44 by maintainers)

Commits related to this issue

Most upvoted comments

Awesome to see you updating this docker project so quickly these days Wolveix! I had the same issue as the guys above. At first I was thinking there was an issue with Docker on Synology (There was a bug with being unable to run the container as root) But even after the workaround of toggling the root option the problem persisted. I checked what the issue was by adding “id” to the init.sh file and saw that the script was being run as uid 1000. My first instinct was changing the folder owner to the “steam” user I had already created months ago but I think that has a different UID. CHOWNing the folder fixed it for me too. Thanks!!

Ah so you’re running the container as root? In that case, don’t supply the --user flag at all. I’ll try a few things with running the container as root myself.

Okay, so you’ll probably want to exec into the container and check the directory. Do this:

docker exec -it satisfactory-server ls -lah /config/saves

Okay i got a Workaround for my Problems with running the Server on my Synology NAS. First i have to start the Docker container in the DSM Docker app with High Privileges Then i have to Set the right Port numbers and set a Volume bind into the /docker dir which is created from the Docker app beacuse in this dir Docker is the owner but i have also to set the folder to allow everyone to write (Im test some things to get rid of this potetial security problem). After this everything works perfect.

I’m having the same issue with permission errors but manually chown’ing the mounted volume isnt helping.

  satisfactory-server:
    image: 'wolveix/satisfactory-server:latest'
    container_name: 'satisfactory'
    hostname: 'satisfactory-server'
    restart: unless-stopped
    ports:
        - '7777:7777/udp'
        - '15000:15000/udp'
        - '15777:15777/udp'
    user: '1002'
    volumes:
        - $USERDIR/satisfactory:/config
    environment:
        - STEAMBETA=true`
shawn@citadel:~/ > \ls -l /opt | grep satis
drwxr-xr-x  6 satisfactory    satisfactory  4096 Oct 28 18:20 satisfactory
shawn@citadel:~/ > id satisfactory 
uid=1002(satisfactory) gid=1002(satisfactory) groups=1002(satisfactory)

It’s able to create some of the folders inside the config folder but can’t seem to create /home/steam/.config

shawn@citadel:~/ > \ls -l /opt/satisfactory/
total 12
drwxr-xr-x 2 satisfactory satisfactory 4096 Oct 28 18:19 backups
drwxr-xr-x 3 satisfactory satisfactory 4096 Oct 28 18:19 gamefiles
drwxr-xr-x 2 satisfactory satisfactory 4096 Oct 28 18:19 saves

shawn@citadel:~/ > docker logs -f satisfactory 
mkdir: cannot create directory '/home/steam/.config': Permission denied
mkdir: cannot create directory '/home/steam/.config': Permission denied
mkdir: cannot create directory '/home/steam/.config': Permission denied
mkdir: cannot create directory '/home/steam/.config': Permission denied

I have to Thank you guys for being so nice and your ambition to help me.

@voruti that did the trick… it starts now. I also added the user to docker-compose file.

I did a quick test in the mean time. There is indeed no change when moving out of the userfolder. Thanks for the (ultra) quick replies.

Adding RUN ls -lAh / to Dockerfile in line 9 and 12:

Step 5/10 : RUN ls -lAh /
 ---> Running in 6893d6130c87
total 68K
-rwxr-xr-x   1 root root    0 Oct 27 17:40 .dockerenv
drwxr-xr-x   1 root root 4.0K Mar  4  2021 bin
drwxr-xr-x   2 root root 4.0K Jan 30  2021 boot
drwxr-xr-x   5 root root  340 Oct 27 17:40 dev
drwxr-xr-x   1 root root 4.0K Oct 27 17:40 etc
drwxr-xr-x   1 root root 4.0K Mar  4  2021 home
drwxr-xr-x   1 root root 4.0K Mar  4  2021 lib
drwxr-xr-x   2 root root 4.0K Mar  4  2021 lib32
drwxr-xr-x   2 root root 4.0K Feb  8  2021 lib64
drwxr-xr-x   2 root root 4.0K Feb  8  2021 media
drwxr-xr-x   2 root root 4.0K Feb  8  2021 mnt
drwxr-xr-x   2 root root 4.0K Feb  8  2021 opt
dr-xr-xr-x 312 root root    0 Oct 27 17:40 proc
drwx------   2 root root 4.0K Feb  8  2021 root
drwxr-xr-x   3 root root 4.0K Feb  8  2021 run
drwxr-xr-x   2 root root 4.0K Feb  8  2021 sbin
drwxr-xr-x   2 root root 4.0K Feb  8  2021 srv
dr-xr-xr-x  13 root root    0 Oct 27 17:39 sys
drwxrwxrwt   1 root root 4.0K Mar  4  2021 tmp
drwxr-xr-x   1 root root 4.0K Mar  4  2021 usr
drwxr-xr-x   1 root root 4.0K Feb  8  2021 var
Removing intermediate container 6893d6130c87
 ---> 752dd1ef6e61
Step 6/10 : VOLUME /config
 ---> Running in dc9ab11e1ecd
Removing intermediate container dc9ab11e1ecd
 ---> 777c934cc6be
Step 7/10 : WORKDIR /config
 ---> Running in da5729f3fc15
Removing intermediate container da5729f3fc15
 ---> ccd0f7a460f4
Step 8/10 : RUN ls -lAh /
 ---> Running in 444ac7641722
total 72K
-rwxr-xr-x   1 root root    0 Oct 27 17:40 .dockerenv
drwxr-xr-x   1 root root 4.0K Mar  4  2021 bin
drwxr-xr-x   2 root root 4.0K Jan 30  2021 boot
drwxr-xr-x   2 root root 4.0K Oct 27 17:40 config
drwxr-xr-x   5 root root  340 Oct 27 17:40 dev
drwxr-xr-x   1 root root 4.0K Oct 27 17:40 etc
drwxr-xr-x   1 root root 4.0K Mar  4  2021 home
drwxr-xr-x   1 root root 4.0K Mar  4  2021 lib
drwxr-xr-x   2 root root 4.0K Mar  4  2021 lib32
drwxr-xr-x   2 root root 4.0K Feb  8  2021 lib64
drwxr-xr-x   2 root root 4.0K Feb  8  2021 media
drwxr-xr-x   2 root root 4.0K Feb  8  2021 mnt
drwxr-xr-x   2 root root 4.0K Feb  8  2021 opt
dr-xr-xr-x 315 root root    0 Oct 27 17:40 proc
drwx------   2 root root 4.0K Feb  8  2021 root
drwxr-xr-x   3 root root 4.0K Feb  8  2021 run
drwxr-xr-x   2 root root 4.0K Feb  8  2021 sbin
drwxr-xr-x   2 root root 4.0K Feb  8  2021 srv
dr-xr-xr-x  13 root root    0 Oct 27 17:39 sys
drwxrwxrwt   1 root root 4.0K Mar  4  2021 tmp
drwxr-xr-x   1 root root 4.0K Mar  4  2021 usr
drwxr-xr-x   1 root root 4.0K Feb  8  2021 var
Removing intermediate container 444ac7641722
 ---> 0361245327dc

But Docker creates the /config directory at runtime as root due to how Docker functions under the hood.

Yes it does this on the host, if you specify a volume mount.

But when starting the container without volume (eg. docker run --network host wolveix/satisfactory-server) the /config folder is used as it is and the container crashes.

The only way (that I can think of) to automatically fix this issue would be to run the image as root and then drop to steam in the init.sh script. But that defeats the whole security purpose outlined above, as the container itself would still be running as root. More than happy for feedback or criticisms 😃

Hey! This is a duplicate of #43 I’m about to add additional information about this. You need to pass --user=1001 or whatever your user ID is on the host (run id).