Docker Debian Access To Path Denied

I’m currently trying my hand at running a Vintage Story server through docker, using the following repo:

I’m running my server on Debian 13, docker version is 26.1.5+dfsg1, build a72d7cd.

After using docker compose up -d, docker ps outputs that it is restarting constantly:

CONTAINER ID   IMAGE                                                   COMMAND                  CREATED         STATUS                           PORTS
<ID>  quartzar/vintage-story-server:latest                    "/srv/gameserver/vin…"   7 minutes ago   Restarting (139) 6 seconds ago        

and docker logs --tail 50 --follow --timestamps <ID> gives:

NOTE: Current version 1.22.5 is the latest stable version
Unhandled exception. System.UnauthorizedAccessException: Access to the path '/srv/gameserver/data/vs/Cache' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
at System.IO.Directory.CreateDirectory(String path)
at Vintagestory.API.Config.GamePaths.EnsurePathsExist() in C:\Users\office-desktop2\Documents\game\VintagestoryApi\Config\GamePaths.cs:line 96
at Vintagestory.Server.ServerProgram..ctor() in C:\Users\office-desktop2\Documents\game\VintagestoryLib\Server\ServerProgram.cs:line 98
at Vintagestory.Server.ServerProgram.Main(String[] args) in C:\Users\office-desktop2\Documents\game\VintagestoryLib\Server\ServerProgram.cs:line 37
at Vintagestory.ServerLinux.Main(String[] args) in C:\Users\office-desktop2\Documents\game\VintagestoryServer\Linux\ServerLinux.cs:line 11

In addition, there is no directories except /lost+found in /srv

My guess is that the container is trying to create a directory in /srv, but lacks permissions. I’ve looked elsewhere but am not finding this exact problem.

I have done sudo groupadd docker then sudo gpasswd -a $USER docker to configure permissions as per solutions to other issues, but this hasn’t helped.

Sorry if I’m missing any information, please let me know (this is my first time posting forum issues on anything, so go easy on me).

The /srv is in the container and a local ./data folder is mounted into the container, but the Dockerfile shows that the process is running as “gameserver” which is a renamed “ubuntu” user during the image building process. The local folder is not mountable as non-root unless you set the right permissions.

The comment shows the userid is 1000

So you could use chown to change the owner of “data” on your host to 1000.

It is rare that I bind mount folders this way so I hope my recommendation is correct.

So the problem looks like the user in the container has no permission to use the folder not that docker has no permission to do something. If you can use the docker command, adding the docker group to your user has no effect. It is just for allowing the client to connect to the socket of the daemon which you can already do and I assume the daemon is running as root so it has access to everything..