[Nix#10062] detect nix store on unsupported filesystems #55

Open
opened 2024-03-16 06:44:40 +00:00 by lix-bot · 0 comments
Member

Upstream-Issue: NixOS/nix#10062

Is your feature request related to a problem? Please describe.

A colleague of mine tried to install Nix with /nix on an NTFS mount. He had no idea that this would not work out well for him.

The way that this goes wrong right now is that the install itself fails with "error: suspicious ownership or permission on /nix/store/<some storepath>". If you migrate your Nix store to NTFS later on the same kind of error starts showing up.

Describe the solution you'd like

I wish this was error condition that gets caught and named more clearly, with a dedicated error message, by the installer before it starts the actual install as well as by the Nix daemon on startup.

Describe alternatives you've considered

I guess the alternative is keeping things as they are.

Additional context

Some steps to reproduce this with a fresh install:

  1. start out on a some Linux distro like Ubuntu with no Nix installed
  2. mount some NTFS volume at /nix
  • sudo mkdir /nix
  • sudo mount -t ntfs /dev/vdb /nix
  1. run the nix installer
  • sh <(curl -L https://nixos.org/nix/install) --daemon
  • answer install questions until install starts running
  1. install fails
~~> Setting up shell profiles for Fish with conf.d/nix.fish inside /etc/fish /usr/local/etc/fish /opt/homebrew/etc/fish /opt/local/etc/fish

~~> Setting up the default profile

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo HOME=/root /nix/store/vi8vjs4m4dnj5lwgm9p6071m0s7v4p26-nix-2.20.3/bin/nix-env -i /nix/store/vi8vjs4m4dnj5lwgm9p6071m0s7v4p26-nix-2.20.3

to install a bootstrapping Nix in to the default profile

installing 'nix-2.20.3'
building '/nix/store/ykahjqw485vhanx3g5wz2q1nk9rrby04-user-environment.drv'...
error: suspicious ownership or permission on '/nix/store/ykahjqw485vhanx3g5wz2q1nk9rrby04-user-environment.drv.chroot/nix/store/xi786yj9a2wc7mcf0ngybskxz4rl8vrx-user-environment' for output 'out'; rejecting this build output

---- oh no! --------------------------------------------------------------------
Oh no, something went wrong. If you can take all the output and open
an issue, we'd love to fix the problem so nobody else has this issue.

:(

We'd love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community

Priorities

Add 👍 to issues you find important.

Upstream-Issue: https://git.lix.systems/NixOS/nix/issues/10062 **Is your feature request related to a problem? Please describe.** A colleague of mine tried to install Nix with `/nix` on an NTFS mount. He had no idea that this would not work out well for him. The way that this goes wrong right now is that the install itself fails with "error: suspicious ownership or permission on `/nix/store/<some storepath>`". If you migrate your Nix store to NTFS later on the same kind of error starts showing up. **Describe the solution you'd like** I wish this was error condition that gets caught and named more clearly, with a dedicated error message, by the installer before it starts the actual install as well as by the Nix daemon on startup. **Describe alternatives you've considered** I guess the alternative is keeping things as they are. **Additional context** Some steps to reproduce this with a fresh install: 0. start out on a some Linux distro like Ubuntu with no Nix installed 1. mount some NTFS volume at /nix - `sudo mkdir /nix` - `sudo mount -t ntfs /dev/vdb /nix` 2. run the nix installer - `sh <(curl -L https://nixos.org/nix/install) --daemon` - answer install questions until install starts running 3. install fails ``` ~~> Setting up shell profiles for Fish with conf.d/nix.fish inside /etc/fish /usr/local/etc/fish /opt/homebrew/etc/fish /opt/local/etc/fish ~~> Setting up the default profile ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo HOME=/root /nix/store/vi8vjs4m4dnj5lwgm9p6071m0s7v4p26-nix-2.20.3/bin/nix-env -i /nix/store/vi8vjs4m4dnj5lwgm9p6071m0s7v4p26-nix-2.20.3 to install a bootstrapping Nix in to the default profile installing 'nix-2.20.3' building '/nix/store/ykahjqw485vhanx3g5wz2q1nk9rrby04-user-environment.drv'... error: suspicious ownership or permission on '/nix/store/ykahjqw485vhanx3g5wz2q1nk9rrby04-user-environment.drv.chroot/nix/store/xi786yj9a2wc7mcf0ngybskxz4rl8vrx-user-environment' for output 'out'; rejecting this build output ---- oh no! -------------------------------------------------------------------- Oh no, something went wrong. If you can take all the output and open an issue, we'd love to fix the problem so nobody else has this issue. :( We'd love to help if you need it. You can open an issue at https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md Or get in touch with the community: https://nixos.org/community ``` **Priorities** Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
lix-bot added the
imported
label 2024-03-16 06:44:40 +00:00
jade added the
E/help wanted
label 2024-03-27 00:44:20 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#55
No description provided.