mirror of
https://github.com/getsentry/self-hosted.git
synced 2026-02-06 10:57:17 +00:00
fix(enhancement): ensure correct ownership check before setting permissions of profiles (#3855)
This commit is contained in:
parent
d57613714c
commit
a36deff0af
@ -4,6 +4,11 @@
|
||||
|
||||
echo "${_group}Ensuring correct permissions on profiles directory ..."
|
||||
|
||||
$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'
|
||||
# Check if the parent directory of /var/vroom/sentry-profiles is already owned by vroom:vroom
|
||||
if [ "$(stat -c '%U:%G' /var/vroom)" = "vroom:vroom" ]; then
|
||||
echo "Ownership of /var/vroom 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}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user