-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
nixos: make daemons run as non-root #41092
Comments
similar: |
I will take a look a munge. It is mainly used as authenticator for slurm. As an application in the category "security" it should maybe not run a root :/ |
@peterhoeg sorry, I didn't realize the merge would close this. |
No problem. And thanks @markuskowa for sorting out munge. |
I see all the graphite services define EDIT: although most services have a |
I'm not realistically going to have enough time for getting this fully sorted in time for 18.09 - if anybody wants to push this forward, please do! |
Please add the httpd service to the list. Tracked in #56304. |
FYI: lighttpd supports systemd socket activation if lighttpd.conf contains |
@gstrauss a fairly common pattern is to use capabilities in this case:
|
Nice. So are there any other questions/limitations about running lighttpd as non-root inside nixos? (I am lighttpd developer, and as you can see, clearly not a nixos expert) |
There really shouldn't be anything special about running services as non-root under NixOS specifically. We're pretty tightly tied to the systemd ecosystem so the question really should be about running lighttpd as non-root under systemd.
NixOS allows us to be a little smarter about the unit files we generate (such as conditionally granting capabilities based on configuration).
My understanding is that the RecommendWay(tm) is to have systemd take care of setting up the environment and therefore change user *before* launching the service. Ideally if the service can be run with DynamicUser = true then do that.
|
gitlab fix: bcfa59b |
Further to #41017, a number of daemons are currently running as root either through the entire life-time of the daemon or in order to do initialization at start and then dropping privs later. Instead we should use the infrastructure we have available to simply have the daemons run as unprivileged users right from the get-go:
The text was updated successfully, but these errors were encountered: