diff --git a/nixos/modules/installer/tools/nixos-install.sh b/nixos/modules/installer/tools/nixos-install.sh index 1ccd6547df5..14ae3daace0 100644 --- a/nixos/modules/installer/tools/nixos-install.sh +++ b/nixos/modules/installer/tools/nixos-install.sh @@ -133,7 +133,7 @@ mkdir -m 0755 -p \ $mountPoint/nix/var/nix/db \ $mountPoint/nix/var/log/nix/drvs -mkdir -m 1735 -p $mountPoint/nix/store +mkdir -m 1775 -p $mountPoint/nix/store chown root:nixbld $mountPoint/nix/store diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh index 42148957be4..173453a17f7 100644 --- a/nixos/modules/system/boot/stage-2-init.sh +++ b/nixos/modules/system/boot/stage-2-init.sh @@ -53,7 +53,7 @@ echo "booting system configuration $systemConfig" > /dev/kmsg # Silence chown/chmod to fail gracefully on a readonly filesystem # like squashfs. chown -f 0:30000 /nix/store -chmod -f 1735 /nix/store +chmod -f 1775 /nix/store if [ -n "@readOnlyStore@" ]; then if ! readonly-mountpoint /nix/store; then mount --bind /nix/store /nix/store