Skip to content

Commit

Permalink
TEST2: unsetting sticky bits
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanrun committed Jan 13, 2025
1 parent 304bc85 commit ff81f72
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,19 @@ cleanup() {
--volume "$OUTPUT_DIR":/output \
--entrypoint /bin/sh \
$DOCKER_IMAGE_TAG \
-c "chmod -R -f o+rwX /output/* || true"
-c "chmod -R -f o-t+rwX /output/* || true"
}


echo "=+= Cleaning up any earlier output"


if [ -d "$OUTPUT_DIR" ]; then
# Ensure permissions are setup correctly
# This allows for the Docker user to write to this location
echo "prior to cleaning: permissions"
ls -alhR "$OUTPUT_DIR"
rm -rf "${OUTPUT_DIR}"/*
chmod -f o+rwx "$OUTPUT_DIR"
else
mkdir -m o+rwx "$OUTPUT_DIR"
mkdir "$OUTPUT_DIR"
fi
chmod -f o-t+rwx "$OUTPUT_DIR"

trap cleanup EXIT

Expand Down

0 comments on commit ff81f72

Please sign in to comment.