From 74586fd2bb17471908d316c502debff2b14c4897 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 9 Aug 2011 15:32:39 +0000 Subject: [PATCH] * Fix the permissions on /tmp. svn path=/nixos/trunk/; revision=28435 --- modules/system/boot/stage-1.nix | 1 + modules/virtualisation/qemu-vm.nix | 3 +++ 2 files changed, 4 insertions(+) diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index cdfbdbbf432..e4f935d7253 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -127,6 +127,7 @@ let cp -v ${pkgs.coreutils}/bin/basename $out/bin cp -v ${pkgs.coreutils}/bin/mkdir $out/bin cp -v ${pkgs.coreutils}/bin/mknod $out/bin + cp -v ${pkgs.coreutils}/bin/chmod $out/bin cp -v ${pkgs.coreutils}/bin/cat $out/bin cp -v ${pkgs.coreutils}/bin/chroot $out/bin cp -v ${pkgs.coreutils}/bin/sleep $out/bin diff --git a/modules/virtualisation/qemu-vm.nix b/modules/virtualisation/qemu-vm.nix index 0dce6936b81..8881cc5304d 100644 --- a/modules/virtualisation/qemu-vm.nix +++ b/modules/virtualisation/qemu-vm.nix @@ -272,6 +272,9 @@ in boot.initrd.postMountCommands = '' + # Fix the permissions on /tmp. + chmod 1777 $targetRoot/tmp + mkdir -p $targetRoot/boot mount -o remount,ro $targetRoot/nix/store ${optionalString cfg.writableStore ''