summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2025-04-01 20:39:31 -0700
committerKent Overstreet <kent.overstreet@linux.dev>2025-04-01 23:43:32 -0400
commite7f6f60b0b2d06ebd9dbbd6163111b979b34188e (patch)
treed857f41c748480d1a7f3464813bffa54d5d90b60
parent0a2d56bc74747093851f0dbde24f1a31e8ee7c06 (diff)
root_image: explicitly chmod the image to 644
Otherwise it is inaccessible to non-root users on systems that use a umask of 0077. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rwxr-xr-xroot_image1
1 files changed, 1 insertions, 0 deletions
diff --git a/root_image b/root_image
index f2f36a4..964c791 100755
--- a/root_image
+++ b/root_image
@@ -333,6 +333,7 @@ cmd_create()
#trap 'umount_image; rm "$ktest_image"' EXIT
fallocate -l "$IMAGE_SIZE" "$ktest_image"
+ chmod 644 "$ktest_image"
mkfs.ext4 -F "$ktest_image"
mount "$ktest_image" "$MNT"