Skip to content

Commit

Permalink
Merge pull request #241 from Callum027/file-permission-changes
Browse files Browse the repository at this point in the history
Minimise user write access to container service files
  • Loading branch information
jammsen authored Apr 27, 2024
2 parents d8b2aa3 + e757dae commit 1845be4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ RUN apt-get update \
COPY --chmod=755 entrypoint.sh /
COPY --chmod=755 scripts/ /scripts
COPY --chmod=755 includes/ /includes
COPY --chmod=755 configs/rcon.yaml /home/steam/steamcmd/rcon.yaml
COPY --chmod=755 configs/PalWorldSettings.ini.template /
COPY --chmod=644 configs/rcon.yaml /home/steam/steamcmd/rcon.yaml
COPY --chmod=644 configs/PalWorldSettings.ini.template /
COPY --chmod=755 gosu-amd64 /usr/local/bin/gosu

RUN mkdir -p "$BACKUP_PATH" \
Expand Down
4 changes: 0 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ fi

chown -R "$APP_USER":"$APP_GROUP" "$APP_HOME"
chown -R "$APP_USER":"$APP_GROUP" "$GAME_ROOT"
chown "$APP_USER":"$APP_GROUP" /entrypoint.sh
chown "$APP_USER":"$APP_GROUP" /PalWorldSettings.ini.template
chown -R "$APP_USER":"$APP_GROUP" /scripts
chown -R "$APP_USER":"$APP_GROUP" /includes

ew_nn "> id steam: " ; e "$(id steam)"

Expand Down
2 changes: 1 addition & 1 deletion includes/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function setup_palworld_settings_ini() {
fi
# Copy default-config, which comes with SteamCMD to gameserver save location
ew "> Copying PalWorldSettings.ini.template to ${GAME_SETTINGS_FILE}"
cp "${PALWORLD_TEMPLATE_FILE}" "${GAME_SETTINGS_FILE}"
cp --no-preserve=ownership "${PALWORLD_TEMPLATE_FILE}" "${GAME_SETTINGS_FILE}"

if [[ -n ${DIFFICULTY+x} ]]; then
e "> Setting Difficulty to '$DIFFICULTY'"
Expand Down

0 comments on commit 1845be4

Please sign in to comment.