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
898 stars 152 forks source link

Fix Volume Permissions #147

Closed thejcpalma closed 5 months ago

thejcpalma commented 5 months ago

Fix Volume Permissions

Summary

This PR adds the entrypoint.sh script to change the ownership of the /palworld directory to the steam user and ensures the servermanager.sh script is run as the steam user.

Motivation

The /palworld directory must be owned by the steam user to ensure the game server operates correctly. Running the servermanager.sh script as the steam user maintains the expected behavior without introducing new issues, eliminating the need for commands like chown -R 1000:1000 game/ or chmod 777 game.

Changes

Testing

The changes were validated by building the Docker image locally and running a container with the updated entrypoint.sh script. The ownership of the /palworld directory was confirmed to be the steam user, and the game server was successfully started using the servermanager.sh script.

Additional Information

Fixes #145

thejcpalma commented 5 months ago

Don't merge, Volume directive in docker resets permitions and ownership if you have VOLUME on dockerfile or a bind volume like in our compose example.

jammsen commented 5 months ago

Don't merge

Okay i wont, but i have questions anyway, so i wouldnt have done it anyway instantly ^^

You write you updated only volumes, but you added a lot of envs and args also you install "inotify-tools".

We dont need thoose yet, or am i wrong?

thejcpalma commented 5 months ago

Don't merge

Okay i wont, but i have questions anyway, so i wouldnt have done it anyway instantly ^^

You write you updated only volumes, but you added a lot of envs and args also you install "inotify-tools".

We dont need thoose yet, or am i wrong?

Preparing for my next pull request as to have abstraction to keep all the vars and paths in one place. No need yet.

Just kill this PR and I'll introduce this in the next one