From 657a685cbef5e04d39b0033fadb9e9e6177b6b7c Mon Sep 17 00:00:00 2001 From: Iven Schlenther Date: Tue, 19 Aug 2025 20:39:04 +0200 Subject: [PATCH] fix(enhancement): search for permissions on docker container instead of host and combine it in one command for performance enhancement (#3890) * fix(enhancement): ensure correct ownership check before setting permissions of profiles * fix(enhancement): search for permissions on docker container instead of host and combine it in one command for performance enhancement Resolves #3882 * fix(enhancement): search for permissions on docker container instead of host --- install/ensure-correct-permissions-profiles-dir.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/ensure-correct-permissions-profiles-dir.sh b/install/ensure-correct-permissions-profiles-dir.sh index 5bdadec..92792b2 100755 --- a/install/ensure-correct-permissions-profiles-dir.sh +++ b/install/ensure-correct-permissions-profiles-dir.sh @@ -5,8 +5,8 @@ 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 [ "$(stat -c '%U:%G' /var/vroom)" = "vroom:vroom" ]; then - echo "Ownership of /var/vroom is already set to vroom:vroom. Skipping chown." +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