-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
chrony: Create state directory with correct owner. #97592
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
Conversation
Why does chrony need to be started as root? |
I asked that question on #97546. It would be nice to fix and remove the tmpfiles rule instead. However I created this as the quick fix that we know works. It is weird because the config does give chrony a capability, but then runs as root anyways. |
Hm. What's weird is that I'm running chrony on two systems (on 20.03) and I don't see this issue. Both instances have |
Hmm, that's odd. The documented behaviour of
I'm not quite sure I understand. Do you mean that it shouldn't be a problem not running as root because it drops privileges anyways or it shouldn't be a problem to write that file because it is started as root? |
Yeah… that was some faulty logic on my part, sorry. In fact, my As for why chronyd runs as root in the first place, they seem to have a check for that, which can be bypassed as such:
Where the With all that said, I'd say we could merge this as a quick fix, but in the long run it would definitely be better to not run this as root, in the first place. |
I see. That all makes sense then. I propose the following:
|
Can you link the upstream issue (or mail archive or whatever they have) here, once you've contacted them? |
@kevincox as part of cleanup can we delete this branch now? |
Fixes #97546
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)