Renegade-Master / zomboid-dedicated-server

Linux based Docker image containing a Dedicated Server for Project Zomboid.

Home Page:https://hub.docker.com/r/renegademaster/zomboid-dedicated-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not sure what I am doing wrong with permissions

balloman opened this issue · comments

I would consider myself a pretty advanced user, but I have to run the container as root for the permissions to work. Running as any other user, even if they have access to the docker and sudoers results in an operation not permitted on startup. On the other hand, if you run as root, then you just get the error can't read /home/steam/Zomboid/Server/ServerName.ini error. In the meantime, I've found another one that seems to work correctly, but I am curious to know what I'm doing wrong here

What command are you using to run the image?

The container is not supposed to be run as the root user.

This is the command that I run:

docker run --detach \
    --mount type=bind,source="$(pwd)/ZomboidDedicatedServer",target=/home/steam/ZomboidDedicatedServer \
    --mount type=bind,source="$(pwd)/ZomboidConfig",target=/home/steam/Zomboid \
    --publish 16261:16261/udp --publish 8766:8766/udp \
    --name zomboid-server \
    --user=$(id -u):$(id -g) \
    renegademaster/zomboid-dedicated-server:1.5.0```

If you are willing to try again, can you run the following?

sudo rm -rf ./ZomboidConfig ./ZomboidDedicatedServer

mkdir ./ZomboidConfig ./ZomboidDedicatedServer

docker run --detach \
    --mount type=bind,source="$(pwd)/ZomboidDedicatedServer",target=/home/steam/ZomboidDedicatedServer \
    --mount type=bind,source="$(pwd)/ZomboidConfig",target=/home/steam/Zomboid \
    --publish 16261:16261/udp --publish 8766:8766/udp \
    --name zomboid-server \
    --user=$(id -u):$(id -g) \
    renegademaster/zomboid-dedicated-server:1.5.0

The README specifies that the folders should be created under the User's account before running the Container.

Closing issue as it has not been responded to in a while. Hopefully the problem was resolved.