build-root-filesystem.sh: Set umask to 0022

On my system (Void Linux) the root user has a default umask of 0077,
causing files and directories in the disk image to have zero group and
world permissions.
This commit is contained in:
Peter Wang 2020-02-03 21:03:41 +11:00 committed by Andreas Kling
parent e2110b633e
commit 3969fcc72e
Notes: sideshowbarker 2024-07-19 09:40:42 +09:00

View file

@ -16,6 +16,8 @@ if [ "$(id -u)" != 0 ]; then
die "this script needs to run as root"
fi
umask 0022
printf "creating initial filesystem structure... "
for dir in bin etc proc mnt tmp; do
mkdir -p mnt/$dir