NixOS #149 (26 Apr)

per-user profile directories cannot be created

On a fresh install of NixOS 0.1pre33921-33922 (x86_64), installed from the minimal ISO, /nix/var/nix/profiles/per-user is created with the wrong permission:

$ ls -l /nix/var/nix/profiles | grep per-user
# on installed system:
drwxr-xr-x 3 root root 4096 Apr 26 13:25 per-user

In contrast to the live image, where that directory has the right permission:

drwxrwxrwt 3 root root 60 Apr 26 13:42 per-user

This creates a problem with every new user account -- on first login, NIX_USER_PROFILE_DIR is created as arranged in /etc/profile, and because the parent directory is non-sticky the creation fails, and thus per-user packages cannot be installed using nix-env.

mkdir: cannot create directory `/nix/var/nix/profiles/per-user/johndoe': Permission denied
stat: cannot stat `/nix/var/nix/profiles/per-user/johndoe': No such file or directory
WARNING: bad ownership on /nix/var/nix/profiles/per-user/michel

A simple chmod invocation (chmod go+wt) fixes the issue, but as a NixOS newbie I'm not sure how to find out where that directory is created, so I can't offer a fix.

-- Issue on YellowGrass -- http://yellowgrass.org --

_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to