···122122 checkPath="$(dirname "$checkPath")"
123123done
124124125125+# Check if the mount point root directory is owned by root
126126+if [[ "$(stat -c '%u:%g' "$mountPoint")" != "0:0" ]]; then
127127+ echo "$0: $mountPoint is not owned by root:root (owned by $(stat -c '%U:%G' "$mountPoint"))"
128128+ echo "$0: installation root directory must be owned by root to avoid system issues"
129129+ echo "$0: run 'sudo chown root:root $mountPoint' to fix this"
130130+ exit 1
131131+fi
132132+125133# Verify that user is not trying to use attribute building and flake
126134# at the same time
127135if [[ -z $buildingAttribute && -n $flake ]]; then