per-user profile directories cannot be created (1)
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 (
Submitted on 26 April 2012 at 13:49chmod 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 Log
On 26 April 2012 at 13:51 Michel Alexandre Salim tagged !msylvestre
On 26 April 2012 at 15:17 Eelco Dolstra commented:
Thanks, I’ve fixed this (r33929).
On 26 April 2012 at 15:17 Eelco Dolstra closed this issue.
Log in to post comments