Git Product home page Git Product logo

Comments (4)

Ericson2314 avatar Ericson2314 commented on July 19, 2024

This doesn't look like a bug to me, /mnt/nix-overlay/nix/var/nix/profiles/per-user indeed should have permissions like /nix/var/nix/profiles/per-user does in order for different users to write profiles in there.

Home directory XDG dirs are generally used more than that dir now, but there are still some exceptions.

from nix.

kevinh-canva avatar kevinh-canva commented on July 19, 2024

@Ericson2314 They have the same permissions, however nix-store --version still fails.

There's also no profiles under /mnt/nix-overlay/nix/var/nix/profiles/per-user either, unlike /nix/var/nix/profiles/per-user where there is root. And there's also no default profile created under the overlay nix dir.

coder@test-nix:~$ stat /nix/var/nix/profiles/per-user
  File: /nix/var/nix/profiles/per-user
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: fc00h/64512d    Inode: 7077902     Links: 3
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2024-06-27 10:45:51.047463649 +1000
Modify: 2024-06-27 10:45:51.435464776 +1000
Change: 2024-07-04 09:16:44.980712844 +1000
 Birth: 2024-06-27 10:45:51.047463649 +1000
coder@test-nix:~$ stat /mnt/nix-overlay/nix/var/nix/profiles/per-user
  File: /mnt/nix-overlay/nix/var/nix/profiles/per-user
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: fc00h/64512d    Inode: 5921401     Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2024-07-04 09:16:44.356714167 +1000
Modify: 2024-07-04 09:16:44.356714167 +1000
Change: 2024-07-04 09:16:44.980712844 +1000
 Birth: 2024-07-04 09:16:44.356714167 +1000
coder@test-nix:~$ nix-store --version
error: could not set permissions on '/mnt/nix-overlay/nix/var/nix/profiles/per-user' to 755: Operation not permitted

from nix.

nixos-discourse avatar nixos-discourse commented on July 19, 2024

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-07-03-nix-team-meeting-minutes-158/49097/1

from nix.

Ericson2314 avatar Ericson2314 commented on July 19, 2024

The expectation is that nix can modify those --- we could add some logic to only chmod if needed, but that would just mean we get some issues later.

Since they are owned by root, the expectation is that you are running Nix as root.

from nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.