-
Notifications
You must be signed in to change notification settings - Fork 892
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
Rust can't delete it's own tmp #3465
Comments
Thanks for reporting it. This is definitely not the normal case. Can you please see if there is a file left in the referenced tmp dir after that error? Also what anti-virus / anti-malware software do you have in use? |
@rbtcollins sorry having you waiting for so long. I only use default windows defender. Indeed, there is a file called |
My turn to apologise :). Can you examine the permissions on that file (or if its gone, whatever files are present, and if no files, e.g. this is what I see:
|
I just deleted tmp manually ._. any way to like.. get it back? could i maybe install another target or so? |
it might be in your Deleted Files / Recycled folder, depending on how you deleted it. I'm not sure if we'll learn much from it there, it might have reset the file ACLS - but perhaps it didn't, worth giving it a go. What I'm trying to figure out is whether the error you are getting is:
Also - what OS version do you have? (just the major - e.g. 7/10/11) |
It's windows 11. I'm running it inside of vs code but i always stop the language server on update |
Hello, I am experiencing this issue as well. I may have seen it before but previously I didn't really pay that close of attention to rustup updating. This is on PS C:\Users\rsmyth\.rustup\tmp> rustup -v
rustup 1.26.0 (5af9b9484 2023-04-05)
The Rust toolchain installer Condensed output: PS C:\Users\rsmyth\Documents\Project> rustup update
...
thread 'main' panicked at 'Unable to clean up C:\Users\rsmyth\.rustup\tmp: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }', src\utils\utils.rs:650:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Full output for the sake of it: rustup update outputPS C:\Users\rsmyth\Documents\Project> rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2023-12-07, rust version 1.74.1 (a28077b28 2023-12-04)
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
14.4 MiB / 14.4 MiB (100 %) 4.7 MiB/s in 3s ETA: 0s
info: downloading component 'rust-std'
17.9 MiB / 17.9 MiB (100 %) 5.4 MiB/s in 3s ETA: 0s
info: downloading component 'rustc'
58.4 MiB / 58.4 MiB (100 %) 4.6 MiB/s in 12s ETA: 0s
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-src'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'rust-src'
2.4 MiB / 2.4 MiB (100 %) 2.0 MiB/s in 7s ETA: 0s
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
14.4 MiB / 14.4 MiB (100 %) 806.4 KiB/s in 50s ETA: 0s
info: installing component 'rust-std'
17.9 MiB / 17.9 MiB (100 %) 9.4 MiB/s in 2s ETA: 0s
info: installing component 'rustc'
58.4 MiB / 58.4 MiB (100 %) 10.0 MiB/s in 6s ETA: 0s
info: installing component 'rustfmt'
warning: could not delete temp file: C:\Users\rsmyth\.rustup\tmp\_zqt_n58jgmo_epw_file
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2023-12-07, rust version 1.76.0-nightly (1fdfe1234 2023-12-06)
info: downloading component 'cargo'
6.7 MiB / 6.7 MiB (100 %) 3.9 MiB/s in 2s ETA: 0s
info: downloading component 'clippy'
info: downloading component 'rust-docs'
14.7 MiB / 14.7 MiB (100 %) 3.8 MiB/s in 4s ETA: 0s
info: downloading component 'rust-std'
18.3 MiB / 18.3 MiB (100 %) 4.1 MiB/s in 4s ETA: 0s
info: downloading component 'rustc'
59.2 MiB / 59.2 MiB (100 %) 4.8 MiB/s in 12s ETA: 0s
info: downloading component 'rustfmt'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
14.7 MiB / 14.7 MiB (100 %) 806.4 KiB/s in 48s ETA: 0s
info: installing component 'rust-std'
18.3 MiB / 18.3 MiB (100 %) 9.4 MiB/s in 2s ETA: 0s
info: installing component 'rustc'
59.2 MiB / 59.2 MiB (100 %) 10.3 MiB/s in 5s ETA: 0s
info: installing component 'rustfmt'
info: checking for self-update
stable-x86_64-pc-windows-msvc updated - rustc 1.74.1 (a28077b28 2023-12-04) (from rustc 1.72.0 (5680fa18f 2023-08-23))
nightly-x86_64-pc-windows-msvc updated - rustc 1.76.0-nightly (1fdfe1234 2023-12-06) (from rustc 1.74.0-nightly (a991861ec 2023-09-05))
info: cleaning up downloads & tmp directories
thread 'main' panicked at 'Unable to clean up C:\Users\rsmyth\.rustup\tmp: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }', src\utils\utils.rs:650:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Next, I tried using an admin powershell with full details: PS C:\WINDOWS\system32> $Env:RUST_BACKTRACE = "full"
PS C:\WINDOWS\system32> rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: checking for self-update
stable-x86_64-pc-windows-msvc unchanged - rustc 1.74.1 (a28077b28 2023-12-04)
nightly-x86_64-pc-windows-msvc unchanged - rustc 1.76.0-nightly (1fdfe1234 2023-12-06)
info: cleaning up downloads & tmp directories
thread 'main' panicked at 'Unable to clean up C:\Users\rsmyth\.rustup\tmp: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }', src\utils\utils.rs:650:13
stack backtrace:
0: 0x7ff6b32f92e3 - <unknown>
1: 0x7ff6b2f28ddb - <unknown>
2: 0x7ff6b32d4ae1 - <unknown>
3: 0x7ff6b32fdf2b - <unknown>
4: 0x7ff6b32fdaf7 - <unknown>
5: 0x7ff6b32fd6f5 - <unknown>
6: 0x7ff6b32fe79d - <unknown>
7: 0x7ff6b32fe4f6 - <unknown>
8: 0x7ff6b32fe43f - <unknown>
9: 0x7ff6b32fe414 - <unknown>
10: 0x7ff6b3426615 - <unknown>
11: 0x7ff6b32b1ee5 - <unknown>
12: 0x7ff6b327a597 - <unknown>
13: 0x7ff6b3263447 - <unknown>
14: 0x7ff6b2e82cf2 - <unknown>
15: 0x7ff6b2e81006 - <unknown>
16: 0x7ff6b2e83bd0 - <unknown>
17: 0x7ff6b33f848c - <unknown>
18: 0x7ff87d1d7344 - BaseThreadInitThunk
19: 0x7ff87ea226b1 - RtlUserThreadStart And as suggested above: PS C:\Users\rsmyth\.rustup> icacls tmp
tmp NT AUTHORITY\SYSTEM:(OI)(CI)(F)
BUILTIN\Administrators:(OI)(CI)(F)
COMAPNY_DOMAIN\rsmyth:(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files Where COMPANY_DOMAIN is my company's domain, as this is a work computer. I just changed it. The details of the file within: PS C:\Users\rsmyth\.rustup> cd tmp
PS C:\Users\rsmyth\.rustup\tmp> ls
Directory: C:\Users\rsmyth\.rustup\tmp
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 9/6/2023 4:12 PM 1286656 _zqt_n58jgmo_epw_file
PS C:\Users\rsmyth\.rustup\tmp> icacls .\_zqt_n58jgmo_epw_file
.\_zqt_n58jgmo_epw_file NT AUTHORITY\SYSTEM:(F)
BUILTIN\Administrators:(F)
COMAPNY_DOMAIN\rsmyth:(F)
Successfully processed 1 files; Failed processing 0 files The file is still there, so let me know if there is anything else I can do. Looking at Lines 647 to 654 in 5af9b94
I don't see anything particularly obvious. |
Ah, I ran the original |
Yes, I had the same problem. Project opened in VSCode and tried to run rustup update in separate terminal |
@RossSmyth @Goozoon Thanks! Similar to #3660, this seems to be another example of #988. |
Closing as a duplicate of #988. |
Problem
Just can't delete its own temp folder on Windows. It panics:
thread 'main' panicked at 'Unable to clean up C:\Users\lixou\.rustup\tmp: Os { code: 5, kind: PermissionDenied, message: "Zugriff verweigert" }', src\utils\utils.rs:650:13
I installed rustup via the exe setup.
Steps
Install rustup via the exe setup on windows.
Possible Solution(s)
No response
Notes
I had this for a while now, thought of reporting the bug
Rustup version
rustup 1.26.0 (5af9b9484 2023-04-05)
Installed toolchains
The text was updated successfully, but these errors were encountered: