Skip to content

Commit

Permalink
Set stricter permissions on /nix/store
Browse files Browse the repository at this point in the history
The nixbld group doesn't need read permission, it only needs write and
execute permission.

(cherry picked from commit 0667587)
  • Loading branch information
edolstra authored and vcunat committed Mar 18, 2015
1 parent a2dc00c commit 224d0d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/installer/tools/nixos-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ mkdir -m 0755 -p \
$mountPoint/nix/var/nix/db \
$mountPoint/nix/var/log/nix/drvs

mkdir -m 1775 -p $mountPoint/nix/store
mkdir -m 1735 -p $mountPoint/nix/store
chown root:nixbld $mountPoint/nix/store


Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/system/boot/stage-2-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 1775 /nix/store
chmod -f 1735 /nix/store
if [ -n "@readOnlyStore@" ]; then
if ! readonly-mountpoint /nix/store; then
mount --bind /nix/store /nix/store
Expand Down

0 comments on commit 224d0d5

Please sign in to comment.