-
Notifications
You must be signed in to change notification settings - Fork 130
[MacOS] Different temporary directory returned when run as sudo #335
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
Comments
I was under the impression that rust always used the user-scoped temporary directories on MacOS. I guess I was wrong and I'm glad they finally made that change. |
But I'll leave this issue open as I can see how it can cause regressions. |
Could this WSL regression be related? cachix/devenv#1815 (comment) |
No, this change is specific to MacOS and the symptoms are quite different. |
Actually, now I'm confused. What WSL are we talking about here (I assumed "Windows Subsystem for Linux")? But the change here won't cause temporary directories/files to be created in random locations, it'll cause them to be created in the correct location ( Your symptoms look like someone is setting |
Uh oh!
There was an error while loading. Please reload this page.
With rust 1.85.0, this change was introduced which now results in a user-scoped temporary directory being returned by
tempfile
when the binary is run assudo
or as a service. Rust 1.84.1 and prior versions always returned/tmp
ifTMPDIR
is unset and now that's changed.It's likely not a problem for most cases, but I ran into an issue where I was passing the temporary directory to a process that's run as the
nobody
user which is unable to access the parent user's temp dir.There may not be anything to change within
tempfile
. Just raising this issue for visiblity.The text was updated successfully, but these errors were encountered: