thijsvanloef / palworld-server-docker

A Docker Container to easily run a Palworld dedicated server.
https://hub.docker.com/r/thijsvanloef/palworld-server-docker
MIT License
2.41k stars 298 forks source link

SED Permission denied issue #333

Closed TopTierKitchenTools closed 6 months ago

TopTierKitchenTools commented 7 months ago

Describe the bug

A bug when running docker-compose.yml on MacOS Sonoma 14.2.1 with Docker-Desktop where it is unable to create the folders for config due to permissions issues despite proper PUID/PGID.

The PUID and PGID from the admin on the MacOS system is 501 (UID) and 20 (GID).

To Reproduce

Steps to reproduce the behavior:

  1. Run docker-compose up -d

Expected behavior

Create config folders properly without issue

Actual behavior

Permissions denied to create config folders

OS information

Hardware information

docker-compose.yml contents

id command from host machine

admin@MacBook-Pro Palworld % id
uid=501(admin) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh-disabled),400(com.apple.access_remote_ae),701(com.apple.sharepoint.group.1)

docker-compose.yml file from host machine

services:
   palworld:
      image: thijsvanloef/palworld-server-docker:latest
      restart: unless-stopped
      container_name: palworld-dedicated-server
      stop_grace_period: 30s
      ports:
        - 8211:8211/udp
        - 27015:27015/udp
      env_file:
        - default.env
      volumes:
         - ./palworld:/palworld/

default.env from host machine

TZ=America/Los_Angeles
PLAYERS=16
PORT=8211
PUID=501
PGID=20
MULTITHREADING=true
COMMUNITY=true
PUBLIC_IP=
PUBLIC_PORT=8211
SERVER_NAME=#secret#
SERVER_DESCRIPTION=#secret#
SERVER_PASSWORD=#secret#
ADMIN_PASSWORD=#secret#
UPDATE_ON_BOOT=true
RCON_ENABLED=true
RCON_PORT=25575
QUERY_PORT=27015
BACKUP_ENABLED=true
DELETE_OLD_BACKUPS=false
OLD_BACKUP_DAYS=365
BACKUP_CRON_EXPRESSION=0 0 * * *
AUTO_UPDATE_ENABLED=false
AUTO_UPDATE_CRON_EXPRESSION=0 * * * *
AUTO_UPDATE_WARN_MINUTES=30
AUTO_REBOOT_ENABLED=false
AUTO_REBOOT_WARN_MINUTES=5
AUTO_REBOOT_CRON_EXPRESSION=0 0 * * *

DIFFICULTY=None
DAYTIME_SPEEDRATE=1.000000
NIGHTTIME_SPEEDRATE=1.000000
EXP_RATE=1.000000
PAL_CAPTURE_RATE=1.000000
PAL_SPAWN_NUM_RATE=1.000000
PAL_DAMAGE_RATE_ATTACK=1.000000
PAL_DAMAGE_RATE_DEFENSE=1.000000
PLAYER_DAMAGE_RATE_ATTACK=1.000000
PLAYER_DAMAGE_RATE_DEFENSE=1.000000
PLAYER_STOMACH_DECREASE_RATE=1.000000
PLAYER_STAMINA_DECREASE_RATE=1.000000
PLAYER_AUTO_HP_REGEN_RATE=1.000000
PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP=1.000000
PAL_STOMACH_DECREASE_RATE=1.000000
PAL_STAMINA_DECREASE_RATE=1.000000
PAL_AUTO_HP_REGEN_RATE=1.000000
PAL_AUTO_HP_REGEN_RATE_IN_SLEEP=1.000000
BUILD_OBJECT_DAMAGE_RATE=1.000000
BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=1.000000
COLLECTION_DROP_RATE=1.000000
COLLECTION_OBJECT_HP_RATE=1.000000
COLLECTION_OBJECT_RESPAWN_SPEED_RATE=1.000000
ENEMY_DROP_ITEM_RATE=1.000000
DEATH_PENALTY=All
ENABLE_PLAYER_TO_PLAYER_DAMAGE=False
ENABLE_FRIENDLY_FIRE=False
ENABLE_INVADER_ENEMY=True
ACTIVE_UNKO=False
ENABLE_AIM_ASSIST_PAD=True
ENABLE_AIM_ASSIST_KEYBOARD=False
DROP_ITEM_MAX_NUM=3000
DROP_ITEM_MAX_NUM_UNKO=100
BASE_CAMP_MAX_NUM=128
BASE_CAMP_WORKER_MAXNUM=15
DROP_ITEM_ALIVE_MAX_HOURS=1.000000
AUTO_RESET_GUILD_NO_ONLINE_PLAYERS=False
AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS=72.00000
GUILD_PLAYER_MAX_NUM=20
PAL_EGG_DEFAULT_HATCHING_TIME=72.00000
WORK_SPEED_RATE=1.000000
IS_MULTIPLAY=False
IS_PVP=False
CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP=False
ENABLE_NON_LOGIN_PENALTY=True
ENABLE_FAST_TRAVEL=True
IS_START_LOCATION_SELECT_BY_MAP=True
EXIST_PLAYER_AFTER_LOGOUT=False
ENABLE_DEFENSE_OTHER_GUILD_PLAYER=False
COOP_PLAYER_MAX_NUM=4
REGION=
USEAUTH=True
BAN_LIST_URL=https://api.palworldgame.com/api/banlist.txt

Container/Host Logs

log from host machine

sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sedBeZesP': Permission denied
PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP=1.000000
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sedxyY2HN': Permission denied
PAL_STOMACH_DECREASE_RATE=1.000000
PAL_STAMINA_DECREASE_RATE=1.000000
PAL_AUTO_HP_REGEN_RATE=1.000000
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sedzMrEKY': Permission denied
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sed0txc7W': Permission denied
PAL_AUTO_HP_REGEN_RATE_IN_SLEEP=1.000000
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sedP1o886': Permission denied
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sed8nhaV7': Permission denied
BUILD_OBJECT_DAMAGE_RATE=1.000000
BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=1.000000
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sed4BrADf': Permission denied
COLLECTION_DROP_RATE=1.000000
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sedXz7qYk': Permission denied
COLLECTION_OBJECT_HP_RATE=1.000000
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sedw7jyim': Permission denied
COLLECTION_OBJECT_RESPAWN_SPEED_RATE=1.000000
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sed1wWKkq': Permission denied
ENEMY_DROP_ITEM_RATE=1.000000
sed: preserving permissions for '/palworld/Pal/Saved/Config/LinuxServer/sedTVLIfy': Permission denied
DEATH_PENALTY=All

ls -n from /Users/home/Server/Palworld/palworld/Pal/Saved/Config/LinuxServer

-rw-r--r--@ 1 501  20     1 Feb  6 21:32 ApexDestruction.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 CameraCalibrationCore.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 CommonUI.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Compat.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Composure.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 ConcertSyncCore.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 ControlRig.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 DatasmithContent.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 DeviceProfiles.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 EditorScriptingUtilities.ini
-rw-r--r--@ 1 501  20  3889 Feb  6 21:32 Engine.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 EnhancedInput.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 FullBodyIK.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 GLTFExporter.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Game.ini
-rw-r--r--@ 1 501  20  1425 Feb  6 21:32 GameUserSettings.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 GameplayTags.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Hardware.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 ImGui.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Input.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 LiveLink.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 LiveLinkCamera.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 MediaIOFramework.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Metasound.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Niagara.ini
-rw-r--r--  1 501  20  1772 Feb  7 21:13 PalWorldSettings.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Paper2D.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 RuntimeOptions.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Scalability.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Synthesis.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 VariantManagerContent.ini
-rw-r--r--@ 1 501  20     1 Feb  6 21:32 Wwise.ini

ls -n from /Users/home/Server/Palworld/palworld/Pal/Saved/Config/

drwxr-xr-x@ 15 501  20   480 Feb  7 21:13 CrashReportClient
drwxr-xr-x@ 34 501  20  1088 Feb  7 21:13 LinuxServer

log from Portainer console of container

root@8364863294bb:/home/steam/server# id   
uid=0(root) gid=0(root) groups=0(root)
Dashboy1998 commented 6 months ago

I believe your issue was cause by sed version 4.7.1 and fixed in version 4.8. The current image (0.25.0) uses sed 4.7.1. The next release will have the fix. If you switch to the dev version you will have the fix now.

thijsvanloef commented 6 months ago

Fixed in release 0.26.0, please reopen if this is not the case

hashar commented 6 months ago

From GNU sed NEWS file:

Noteworthy changes in release 4.8 (2020-01-14) [stable]

Bug fixes

"sed -i" now creates temporary files with correct umask (limited to u=rwx). Previously sed would incorrectly set umask on temporary files, resulting in problems under certain fuse-like file systems. [bug introduced in sed 4.2.1]