self-hosted/install/ensure-correct-permissions-profiles-dir.sh
Reinaldy Rafli de2139890d
fix: ensuring vroom permission should be skipped on errors-only (#3911)
* fix: ensuring vroom permission should be skipped on errors-only

* feat: enable swap on all runners

* feat: don't exit on install script
2025-09-02 21:35:33 +07:00

18 lines
812 B
Bash
Executable File

#!/usr/bin/env bash
# TODO: Remove this after the next hard-stop
# Should only run when `$COMPOSE_PROFILES` is set to `feature-complete`
if [[ "$COMPOSE_PROFILES" == "feature-complete" ]]; then
echo "${_group}Ensuring correct permissions on profiles directory ..."
# Check if the parent directory of /var/vroom/sentry-profiles is already owned by vroom:vroom
if [ "$($dcr --no-deps --entrypoint /bin/bash --user root vroom -c "stat -c '%U:%G' /var/vroom/sentry-profiles" 2>/dev/null)" = "vroom:vroom" ]; then
echo "Ownership of /var/vroom/sentry-profiles is already set to vroom:vroom. Skipping chown."
else
$dcr --no-deps --entrypoint /bin/bash --user root vroom -c 'chown -R vroom:vroom /var/vroom/sentry-profiles && chmod -R o+rwx /var/vroom/sentry-profiles'
fi
echo "${_endgroup}"
fi