mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Set stricter permissions on /nix/store
The nixbld group doesn't need read permission, it only needs write and execute permission.
This commit is contained in:
parent
037af9ffcc
commit
066758758e
2 changed files with 2 additions and 2 deletions
|
@ -127,7 +127,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
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ echo "booting system configuration $systemConfig" > /dev/kmsg
|
|||
# the Nix store. Note that we can't use "chown root:nixbld" here
|
||||
# because users/groups might not exist yet.
|
||||
chown 0:30000 /nix/store
|
||||
chmod 1775 /nix/store
|
||||
chmod 1735 /nix/store
|
||||
if [ -n "@readOnlyStore@" ]; then
|
||||
if ! readonly-mountpoint /nix/store; then
|
||||
mount --bind /nix/store /nix/store
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue