You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Give /tmp/nix-build* in ownership to the nix-build caller #100
I took a brief look at this: So there is void DerivationGoal::deleteTmpDir(bool force) in src/libstore/build.cc which is called by src/libstore/build.cc but the store has no clue about the actual user, which is in fact a good thing.
I was chatting with @grahamc about this and he pointed out that one nice way to go about this would be to tar up the temporary build directory and make it available to the user via the daemon socket. This wouldn't only solve the issue at hand, it would also make -K work when using remote builders.
But as nice as this sounds I unfortunately lack the insight to implement this. I just wanted to document the thought here though.
Activity
Ekleog commentedon Jan 18, 2019
This is a much needed feature when using
nixwithout root rights: it'd allow removing the directory after having created it withnix-build -Kgilligan commentedon Mar 6, 2020
I took a brief look at this: So there is
void DerivationGoal::deleteTmpDir(bool force)in src/libstore/build.cc which is called by src/libstore/build.cc but the store has no clue about the actual user, which is in fact a good thing.I was chatting with @grahamc about this and he pointed out that one nice way to go about this would be to tar up the temporary build directory and make it available to the user via the daemon socket. This wouldn't only solve the issue at hand, it would also make
-Kwork when using remote builders.But as nice as this sounds I unfortunately lack the insight to implement this. I just wanted to document the thought here though.
stale commentedon Feb 16, 2021
I marked this as stale due to inactivity. → More info
dasJ commentedon May 9, 2021
If this ever gets implemented (which I doubt by now), we need to be mitigate security vulnerability that Guix had regarding this behaviour: https://guix.gnu.org/en/blog/2021/risk-of-local-privilege-escalation-via-guix-daemon/
stale commentedon Nov 16, 2021
I marked this as stale due to inactivity. → More info
3 remaining items
nixos-discourse commentedon Jan 13, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2023-01-13-nix-team-meeting-minutes-23/24644/1
Merge pull request NixOS#100 from DeterminateSystems/lib-tests-lazy
libstore/store-api: extract forEachConfiguredSigner helper
doc/inventory: Branch lines for libstore cleanup batch (7 landed, 1 s…
doc/inventory: add NixOS#220 and NixOS#221 + record Pass-B follow-up …
doc/inventory: STATUS — record Pass-B follow-up amends + NixOS#220/Ni…
doc/inventory: re-sync four Branch lines + fix NixOS#220 candidate body
libstore/store-api: extract forEachConfiguredSigner helper
doc/inventory: file NixOS#234-NixOS#238 from post-Batch-G adversarial…
libstore/store-api: extract forEachConfiguredSigner helper
libstore/store-api: cache parsed secret keys by file path
tomberek commentedon Aug 13, 2026
Closing as stale. Re-open if needed.