Closed svedie closed 3 years ago
I don't know what portainer or OpenMediaVault is, but what are the permissions of /opt/valheim/server/
and the files therein?
Can you paste a directory listing?
Thinking about it, if there are no prior errors in the log it would mean the container was able to download and extract the files but is not allowed to execute the server binary. Could it be that the volume is mounted noexec
?
yes, he can download the files.
drwxr-xr-x+ 5 root root 4096 Feb 27 19:58 BepInEx -rw-r--r--+ 1 root root 908 Feb 14 18:00 doorstop_config.ini drwxr-xr-x+ 2 root root 4096 Feb 25 10:35 doorstop_libs drwxrwxr-x+ 2 admin users 4096 Feb 27 19:28 linux64 -rwxrwxr-x+ 1 admin users 4728 Feb 27 19:28 LinuxPlayer_s.debug -rw-r--r--+ 1 root root 1004 Feb 21 22:34 start_game_bepinex.sh -rw-r--r--+ 1 root root 2811 Feb 23 12:23 start_server_alternative.sh -rw-r--r--+ 1 root root 938 Feb 21 11:53 start_server_bepinex.sh -rwxrwxr-x+ 1 admin users 575 Feb 27 19:28 start_server.sh -rwxrwxr-x+ 1 admin users 34 Feb 27 19:28 start_server_xterm.sh -rwxrwxr-x+ 1 admin users 7 Feb 27 19:28 steam_appid.txt -rwxrwxr-x+ 1 admin users 29456421 Feb 27 19:28 steamclient.so -rwxrwxr-x+ 1 admin users 7041000 Feb 27 19:28 UnityPlayer_s.debug -rwxrwxr-x+ 1 admin users 29484584 Feb 27 19:28 UnityPlayer.so drwxr-xr-x+ 2 root root 4096 Feb 25 10:35 unstripped_corlib -rwxrwxr-x+ 1 admin users 131994 Feb 27 19:28 'Valheim Dedicated Server Manual.pdf' drwxrwxr-x+ 6 admin users 4096 Feb 27 19:28 valheim_server_Data -rwxrwxr-x+ 1 admin users 6344 Feb 27 19:28 valheim_server.x86_64 -rw-r--r--+ 1 root root 23040 Feb 14 17:57 winhttp.dll
Hmm and the files are even executable by everyone.
I also don't understand why some files are owned by root and some by a user named admin. What UID is that admin user? I'm assuming this directory listing wasn't done inside the container, as there is no user admin inside the container.
What happens when you enter the container docker exec -it <container-id> /bin/bash
and try to execute the file yourself /opt/valheim/server/valheim_server.x86_64
?
I will try to find it out.
ls -aln
should show the UID instead of the name.
drwxrwxrwx+ 4 0 0 4096 Feb 27 20:38 . drwxr-xr-x+ 5 0 0 4096 Feb 27 20:38 .. drwxrwxrwx+ 2 0 0 4096 Feb 27 20:38 linux64 -rwxrwxrwx+ 1 0 0 4728 Feb 27 20:38 LinuxPlayer_s.debug -rwxrwxrwx+ 1 0 0 575 Feb 27 20:38 start_server.sh -rwxrwxrwx+ 1 0 0 34 Feb 27 20:38 start_server_xterm.sh -rwxrwxrwx+ 1 0 0 7 Feb 27 20:38 steam_appid.txt -rwxrwxrwx+ 1 0 0 29456421 Feb 27 20:38 steamclient.so -rwxrwxrwx+ 1 0 0 7041000 Feb 27 20:38 UnityPlayer_s.debug -rwxrwxrwx+ 1 0 0 29484584 Feb 27 20:38 UnityPlayer.so -rwxrwxrwx+ 1 0 0 131994 Feb 27 20:38 'Valheim Dedicated Server Manual.pdf' drwxrwxrwx+ 6 0 0 4096 Feb 27 20:38 valheim_server_Data -rwxrwxrwx+ 1 0 0 6344 Feb 27 20:38 valheim_server.x86_64
on docker the permissions are: root@da32762142cb:/opt/valheim/server# ls -aln total 64632 drwxrwxrwx+ 4 998 100 4096 Feb 27 19:51 . drwxrwxrwx+ 5 998 100 4096 Feb 27 19:38 .. -rwxrwxrwx+ 1 998 100 4728 Feb 27 19:38 LinuxPlayer_s.debug -rwxrwxrwx+ 1 998 100 29484584 Feb 27 19:38 UnityPlayer.so -rwxrwxrwx+ 1 998 100 7041000 Feb 27 19:38 UnityPlayer_s.debug -rwxrwxrwx+ 1 998 100 131994 Feb 27 19:38 'Valheim Dedicated Server Manual.pdf' drwxrwxrwx+ 2 998 100 4096 Feb 27 19:38 linux64 -rwxrwxrwx+ 1 998 100 575 Feb 27 19:38 start_server.sh -rwxrwxrwx+ 1 998 100 34 Feb 27 19:38 start_server_xterm.sh -rwxrwxrwx+ 1 998 100 7 Feb 27 19:38 steam_appid.txt -rwxrwxrwx+ 1 998 100 29456421 Feb 27 19:38 steamclient.so -rwxrwxrwx+ 1 998 100 6344 Feb 27 19:38 valheim_server.x86_64 drwxrwxrwx+ 6 998 100 4096 Feb 27 19:38 valheim_server_Data
Make sure you set the SGID bit when creating your valheim folder. That way newly created files/folders will inherit the parent folder permissions. Set the SGID bit with the chown command. Redeploy your image.
Thank you! I will try it out!
Hi, I am getting this error too. I also am using OMV. I think I changed the SGID correctly but I am still having the issue. Any help would be appreciated.
2021-04-09 15:14:36,946 INFO spawned: 'valheim-server' with pid 242
Apr 9 15:14:36 /supervisord: valheim-server INFO - Running Valheim Server
Apr 9 15:14:36 /supervisord: valheim-server DEBUG - [242] - Server config is name: ** , port: 2356/udp, world: test1, public: 0, mod: none
Apr 9 15:14:36 /supervisord: valheim-server DEBUG - [242] - Valheim server with PID 245 stopped
Apr 9 15:14:36 /supervisord: valheim-server INFO - Releasing PID file /var/run/valheim-server.pid
2021-04-09 15:14:36,968 INFO exited: valheim-server (exit status 0; not expected)
Apr 9 15:14:36 /supervisord: valheim-server INFO - Shutdown complete
Apr 9 15:14:36 /supervisord: valheim-server /usr/local/bin/valheim-server: line 110: /opt/valheim/server/valheim_server.x86_64: Permission denied
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968069 250 main.go:76] Configuring Valheim server log filter
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968226 250 main.go:96] Removing log lines starting with '(Filename:'
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968256 250 main.go:89] Removing log lines matching ' '
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968276 250 main.go:125] Removing invalid UTF-8 chars: true
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968302 250 main.go:122] Removing empty log lines: true
Apr 9 15:14:36 /supervisord: valheim-server I0409 15:14:36.968327 250 main.go:96] Removing log lines starting with 'src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp'
2021-04-09 15:14:37,970 INFO reaped unknown pid 247 (exit status 0)
2021-04-09 15:14:40,972 INFO reaped unknown pid 249 (exit status 0)
services: valheim: image: lloesche/valheim-server cap_add:
After running and redeploying: root@openmediavault:/srv/dev-disk-by-label-Storage/software# chmod 2777 valheim
This is the permissions I get: root@openmediavault:/srv/dev-disk-by-label-Storage/software/valheim/data/server# ls -lsa total 65616 4 drwxrwsrwx+ 4 root root 4096 Apr 9 11:38 . 4 drwxr-sr-x+ 6 root root 4096 Apr 9 11:02 .. 8 -rwxrwxrwx 1 root root 4728 Apr 9 11:01 LinuxPlayer_s.debug 28796 -rwxrwxrwx 1 root root 29484584 Apr 9 11:01 UnityPlayer.so 6876 -rwxrwxrwx 1 root root 7041000 Apr 9 11:01 UnityPlayer_s.debug 132 -rwxrwxrwx 1 root root 133822 Apr 9 11:01 'Valheim Dedicated Server Manual.pdf' 4 drwxrwsrwx+ 2 root root 4096 Apr 9 11:01 linux64 4 -rwxrwxrwx 1 root root 575 Apr 9 11:01 start_server.sh 4 -rwxrwxrwx 1 root root 34 Apr 9 11:01 start_server_xterm.sh 4 -rwxrwxrwx 1 root root 7 Apr 9 11:01 steam_appid.txt 29768 -rwxrwxrwx 1 root root 30480914 Apr 9 11:01 steamclient.so 8 -rwxrwxrwx 1 root root 6344 Apr 9 11:01 valheim_server.x86_64 4 drwxrwsrwx+ 6 root root 4096 Apr 9 11:01 valheim_server_Data
@lloesche Help, I'm gettting this exact same error on Ubuntu LTS, using docker
Mar 5 20:59:55 supervisord: valheim-server /usr/local/bin/valheim-server: line 112: /opt/valheim/server/valheim_server.x86_64: Permission denied
I can't find config.xml file or any similar
Hi,
maybe you know the issue or can give some advice. I got installed the container with portainer on an OpenMediaVault server, but get this error with write permission.
2021-02-27 18:42:29 [14] (40) Valheim Server is already the latest version 2021-02-27 18:42:29,190 INFO spawned: 'valheim-server' with pid 101 2021-02-27 18:42:29 [101] (40) Running Valheim Server /usr/local/bin/valheim-server: line 71: /opt/valheim/server/valheim_server.x86_64: Permission denied 2021-02-27 18:42:29,200 INFO reaped unknown pid 108 2021-02-27 18:42:29 [101] (40) Releasing PID file /var/run/valheim-server.pid 2021-02-27 18:42:29,202 INFO exited: valheim-server (exit status 0; not expected) 2021-02-27 18:42:29,202 INFO reaped unknown pid 107