ich777 / docker-steamcmd-server

Simple Dockerfile that installs steamcmd and a selected game server
119 stars 95 forks source link

Starbound - line 16: Permission Denied #35

Closed Stultusaur closed 1 year ago

Stultusaur commented 1 year ago

Issue:

Permission Denied error when launching the container.

Notes: I am using Portainer to manage/create docker containers.

Configuration: Name: starbound

Volumes: Container: /serverdata/steamcmd Host: /mnt/games/games/steamcmd

Container: /serverdata/serverfiles Host: /mnt/games/games/starbound

Environment Variables: GAME_ID=533830 GAME_NAME=ServerStarbound UID=9990 GID=9992 USERNAME= PASSWRD= PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DATA_DIR=/serverdata STEAMCMD_DIR=/serverdata/steamcmd SERVER_DIR=/serverdata/serverfiles GAME_PARAMS=template GAME_PORT=27015 VALIDATE= UMASK=000 USER=steam DATA_PERM=770

Full Logs

---Ensuring UID: 9990 matches user--- ---Ensuring GID: 9992 matches user--- usermod: no changes ---Setting umask to 000--- ---Checking for optional scripts--- ---No optional script found, continuing--- ---Taking ownership of data...--- ---Starting...--- SteamCMD not found! steamcmd.sh linux32/steamcmd linux32/steamerrorreporter linux32/libstdc++.so.6 linux32/crashhandler.so ---Update SteamCMD--- /opt/scripts/start-server.sh: line 16: /serverdata/steamcmd/steamcmd.sh: Permission denied ---Update Server--- /opt/scripts/start-server.sh: line 46: /serverdata/steamcmd/steamcmd.sh: Permission denied ---Prepare Server--- ---Starbound server configuration not found, downloading--- ---Server ready--- ---Start Server--- ---Something went wrong with the game download, putting server into sleep mode---

ich777 commented 1 year ago

Are you really sure that the UID 9990 with the GID 9992 has permission to execute scripts in the folder /mnt/games/games/steamcmd.

Usually this indicates a permission issue of some sort on the host side because at these stages the container tries to execute the downloaded steamcmd.sh

Please make sure that the user has enough rights to execute scripts.

Stultusaur commented 1 year ago

Thanks for the response,

I cannot say 100% if this is the issue or not without checking, but I have a few other docker containers for different games that do work using the same user.

None of those are SteamCMD games however.

iirc the folder/file permissions are either 775 or 755 (ug=rwx,o=rx or u=rwx,go=rx)

On Wed, 31 May 2023 at 3:51 am, Christoph Hummer @.***> wrote:

Are you really sure that the UID 9990 with the GID 9992 has permission to execute scripts in the folder /mnt/games/games/steamcmd.

Usually this indicates a permission issue of some sort on the host side because at these stages the container tries to execute the downloaded steamcmd.sh

Please make sure that the user has enough rights to execute scripts.

— Reply to this email directly, view it on GitHub https://github.com/ich777/docker-steamcmd-server/issues/35#issuecomment-1568874630, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARXXJMNOG5UEWNKQFBEHH63XIY3DRANCNFSM6AAAAAAYUFMQVI . You are receiving this because you authored the thread.Message ID: @.***>

ich777 commented 1 year ago

This is really strange… All my containers work the same and they are running flawlessly on many systems even if these are not Unraid systems.

I would also recommend that you use the run example from the readme for Starbound (of course change the values to your needs):

docker run --name Starbound -d \
    -p 21025:21025 -p 21025:21025/udp -p 21026:21026 \
    --env 'GAME_ID=533830' \
    --env 'UID=99' \
    --env 'GID=100' \
    --volume /path/to/steamcmd:/serverdata/steamcmd \
    --volume /path/to/starbound:/serverdata/serverfiles \
    ich777/steamcmd:starbound
Stultusaur commented 1 year ago

Ran it externally from Portainer. Same problem occurred.

Changed the directory permissions 777, (as a test) and still didn't work.

Stultusaur commented 1 year ago

Alright, so upon further inspection, the issue of permission denied, was due to the mount not allowing binaries to be executed. You were correct.

Resolved that issue, now another issue has arisen,

See below for error logs:

Full Logs

---Taking ownership of data...--- ---Starting...--- ---Update SteamCMD--- Redirecting stderr to '/serverdata/Steam/logs/stderr.txt' [ 0%] Checking for available updates... [----] Verifying installation... Steam Console Client (c) Valve Corporation - version 1682708339 -- type 'quit' to exit -- Loading Steam API...OK Logging in user '' to Steam Public...OK Waiting for client config...OK Waiting for user info...OK ---Update Server--- Redirecting stderr to '/serverdata/Steam/logs/stderr.txt' [ 0%] Checking for available updates... [----] Verifying installation... Steam Console Client (c) Valve Corporation - version 1682708339 -- type 'quit' to exit -- Loading Steam API...OK Logging in user '' to Steam Public...OK Waiting for client config...OK Waiting for user info...OK Success! App '533830' already up to date. ---Prepare Server--- ---Starbound server configuration found!--- ---Server ready--- ---Start Server--- Error: Too many positional arguments given, expected at most 0 got 1 starbound_server: Command Line Usage: starbound_server [-help] [-version] [-bootconfig ] [-logfile ] [-loglevel ] [-quiet] [-verbose] [-runtimeconfig] -help - Show help text -version - Print version info -bootconfig - Boot time configuration file, defaults to sbinit.config -logfile - Log to the given logfile relative to the root directory, defaults to starbound_server.log -loglevel - Sets the logging level (debug|info|warn|error), defaults to Info -quiet - Do not log to stdout, defaults to false -verbose - Log to stdout, defaults to true -runtimeconfig - Sets the path to the runtime configuration storage file relative to root directory, defauts to starbound_server.config ---Ensuring UID: 9990 matches user--- usermod: no changes ---Ensuring GID: 9992 matches user--- usermod: no changes ---Setting umask to 000--- ---Checking for optional scripts--- ---No optional script found, continuing---

Stultusaur commented 1 year ago

Ignore the above comment, this was because by default the game parameters set "template" instead of a blank string, as a result caused this issue.

Thank you for the assistance in resolving, my self inflicted, problems.