Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiles Permissions Issue on WSL2 #280

Closed
metcalfc opened this issue Feb 28, 2023 · 2 comments
Closed

Profiles Permissions Issue on WSL2 #280

metcalfc opened this issue Feb 28, 2023 · 2 comments

Comments

@metcalfc
Copy link

Steps taken:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
exit # restart shell
nix search git
error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted

Fairly standard Ubuntu WSL2 setup. Accepted the defaults. The script elevated to sudo itself.

ls -al /nix/
total 7696
drwxr-xr-x  4 root root      4096 Feb 27 16:25 .
drwxr-xr-x 20 root root      4096 Feb 27 16:25 ..
-rw-r--r--  1 root root     17793 Dec 31  1969 .reginfo
-rwxr-xr-x  1 root root   7813432 Feb 27 16:25 nix-installer
-rw-r--r--  1 root root     27630 Feb 27 16:25 receipt.json
drwxrwxr-t 51 root nixbld    4096 Feb 27 16:25 store
drwxr-xr-x  4 root root      4096 Feb 27 16:25 var

ls -al /nix/var/nix/profiles/per-user/
total 12
drwxr-xr-x 3 root root 4096 Feb 27 16:25 .
drwxr-xr-x 3 root root 4096 Feb 27 16:25 ..
drwxr-xr-x 2 root root 4096 Feb 27 16:25 root
@georgealexanderday
Copy link

georgealexanderday commented Feb 28, 2023

Same issue, fresh install of ubuntu 22.04

Edit: Now working, forgot to double check that the system was booted with systemd

@metcalfc
Copy link
Author

metcalfc commented Mar 1, 2023

I uninstalled and reinstalled after having enabled systemd per https://ubuntu.com/blog/ubuntu-wsl-enable-systemd and it works now.

For folks that find this after the docs are here: https://github.com/DeterminateSystems/nix-installer#in-wsl

@metcalfc metcalfc closed this as completed Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants