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

Downloads and store operations should not be performed as root #32185

Closed
dhess opened this issue Nov 30, 2017 · 1 comment
Closed

Downloads and store operations should not be performed as root #32185

dhess opened this issue Nov 30, 2017 · 1 comment

Comments

@dhess
Copy link
Contributor

dhess commented Nov 30, 2017

Issue description

I noticed on my new multi-user Nix install on macOS that fetches and store operations are performed as the root user. Builds are done by a nixbld user, as expected.

On macOS, at least, the store is g+w and the group is nixbld, so store operations should be done as a nixbld user for reasons of least privilege -- ditto for downloads.

On irc, @grahamc confirmed that this behavior is also manifest on NixOS. Presumably this behavior is also unwanted there.

Steps to reproduce

Use nix-env to build a package that hits the cache. While this is downloading and unpacking, use ps auxww | grep nix and observe that the downloads and store operations are performed by root.

@dhess
Copy link
Contributor Author

dhess commented Nov 30, 2017

Whoops, I guess this needs to be reported on nix.

@dhess dhess closed this as completed Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant