forked from rarias/jungle
Remove sgid from .nix-portable and set group
This should prevent issues when putting it under
/gpfs/{projects,scratch} that have sgid and group=nobody.
This commit is contained in:
@@ -150,6 +150,15 @@ let
|
|||||||
[ -z "\$NP_LOCATION" ] && NP_LOCATION="\$HOME"
|
[ -z "\$NP_LOCATION" ] && NP_LOCATION="\$HOME"
|
||||||
NP_LOCATION="\$(readlink -f "\$NP_LOCATION")"
|
NP_LOCATION="\$(readlink -f "\$NP_LOCATION")"
|
||||||
dir="\$NP_LOCATION/.nix-portable"
|
dir="\$NP_LOCATION/.nix-portable"
|
||||||
|
|
||||||
|
# Create NP_LOCATION and remove sgid bit
|
||||||
|
mkdir -p \$dir
|
||||||
|
if [ ! -z "\$BSC_MACHINE" ]; then
|
||||||
|
# Attempt to avoid issues with sgid folders
|
||||||
|
chmod g-s \$dir
|
||||||
|
chgrp bsc \$dir
|
||||||
|
fi
|
||||||
|
|
||||||
store="\$dir/nix/store"
|
store="\$dir/nix/store"
|
||||||
# create /nix/var/nix to prevent nix from falling back to chroot store.
|
# create /nix/var/nix to prevent nix from falling back to chroot store.
|
||||||
mkdir -p \$dir/{bin,nix/var/nix,nix/store}
|
mkdir -p \$dir/{bin,nix/var/nix,nix/store}
|
||||||
|
|||||||
Reference in New Issue
Block a user