jammsen / docker-palworld-dedicated-server

Docker container to easily provision and manage Palworld Dedicated Server
https://hub.docker.com/r/jammsen/palworld-dedicated-server
MIT License
911 stars 158 forks source link

[Bug] Getting permission denied when the container is creating directories #62

Closed Alexnortung closed 9 months ago

Alexnortung commented 9 months ago

Have you read the Important information text above

Current behavior

When the script reaches the starting game server step it is unable to create a directory and other files

palworld-dedicated-server  | >>> Starting the gameserver
palworld-dedicated-server  | Checking if config exists
palworld-dedicated-server  | No config found, generating one
palworld-dedicated-server  | mkdir: cannot create directory '/palworld/Pal': Permission denied

Desired behavior

I would like it to be able to create the folder and copy over the files

Links to screenshots

No response

To Reproduce

create a docker-compose.yml with this content

version: '3.9'
services:
  palworld-dedicated-server:
    # user: steam
    container_name: palworld-dedicated-server
    image: jammsen/palworld-dedicated-server:latest
    restart: always
    network_mode: bridge
    ports:
      - target: 8211 # Gamerserver port inside of the container
        published: 8211 # Gamerserver port on your host
        protocol: udp
        mode: host
      - target: 25575 # RCon port inside of the container
        published: 25575 # RCon port on your host
        protocol: tcp
        mode: host
    environment:
      - TZ=Europe/Copenhagen # Change this for logging and backup, see "Environment-Variables"
      - ALWAYS_UPDATE_ON_START=true
      - MAX_PLAYERS=32
      - MULTITHREAD_ENABLED=true
      - COMMUNITY_SERVER=true
      - RCON_ENABLED=true
      - RCON_PORT=25575
      - PUBLIC_IP=10.0.0.5
      - PUBLIC_PORT=8211
      - SERVER_NAME=aaa
      - SERVER_DESCRIPTION=aaa
      - SERVER_PASSWORD=aaa
      - ADMIN_PASSWORD=Tamale-Enlarged7-Bush
      - BACKUP_ENABLED=true
      - BACKUP_CRON_EXPRESSION=0 * * * *
    volumes:
      - ./game:/palworld

and run sudo docker compose up

Software setup

Hardware setup

Additional context

If I run the following commands I can see that the user is correctly set to steam, but the folders have not been assigned ownership.

sudo docker exec -ti palworld-dedicated-server whoami
steam
sudo docker exec -ti palworld-dedicated-server ls -lah /palworld
total 12K
drwxr-xr-x. 2 root root 4.0K Jan 25 16:13 .
drwxr-xr-x. 1 root root 4.0K Jan 25 16:18 ..
jseiser commented 9 months ago

https://github.com/jammsen/docker-palworld-dedicated-server/blob/master/README.md?plain=1#L30

That or give the UID:GID of the steam user access to the filesystem.

jammsen commented 9 months ago

Hey @Alexnortung

https://github.com/jammsen/docker-palworld-dedicated-server/blob/master/README.md?plain=1#L30

That or give the UID:GID of the steam user access to the filesystem.

Yeah and also the fix for named volumes was added earlier today. This should be working if you follow the readme. Please try again and report back.