diff --git a/Kernel/build-image-qemu.sh b/Kernel/build-image-qemu.sh index 229663868e9..492293a068b 100755 --- a/Kernel/build-image-qemu.sh +++ b/Kernel/build-image-qemu.sh @@ -13,7 +13,7 @@ fi echo "setting up disk image..." qemu-img create _disk_image ${DISK_SIZE:-500}m || die "couldn't create disk image" -chown 1000:1000 _disk_image || die "couldn't adjust permissions on disk image" +chown $build_user:$build_group _disk_image || die "couldn't adjust permissions on disk image" echo "done" echo -n "creating new filesystem... " diff --git a/Kernel/makeall.sh b/Kernel/makeall.sh index 6ab41fec295..55d75e51e15 100755 --- a/Kernel/makeall.sh +++ b/Kernel/makeall.sh @@ -1,6 +1,10 @@ #!/bin/bash set -e +# Get user and group details for setting qemu disk image ownership +export build_user=$(id -u) +export build_group=$(id -g) + sudo id if [ -z "$MAKEJOBS" ]; then