Rust Installer causing error: Access is denied. (os error 5)

Hello everyone,

I have no experience with the Rust language, and have been trying to download it. I have deleted and reinstalled the rust installer 3 times now, though everytime I run it, I just get an error message saying the access is denied.

Any feedback would be greatly appreciated!

If I had to guess, is say you're running the installer as Administrator and your antivirus program is automatically quarantining the cargo, rustc, and rustup binaries the installer is putting in ~\.cargo\bin\.

It's odd becuase I have the same AV software running on my other machine, and installed it as administrator. I went to the .cargo folder and everything was there. Usually if an item becomes quarantined by my AV, the location of where the files are located is not the path of where the .cargo file was. I will just have to keep looking for a workaround.

Thank you for your feedback, I really appreciate it!

Solution: I ran my AV's (Bitdefender) quick scan and the RUSTUP-INIT.exe simultaneously, and it worked. It was very odd, but I think running them at the same time allowed to check the process and see if any malware would be detected.

Again, thank you for your help!

Bitdefender reported and broke so many of my builds that I disabled it for my src/, .cargo/ and .rustup/ directories.

1 Like

I think it is best that I do the same. Thank you for sharing this, I appreciate it!

1 Like

I second martys71's recommendation. Bitdefender and Rust do not mix well. Bitdefender will randomly fail your builds - there's something about the way cargo works that triggers Bitdefender. This problem has been known for 5 years last time I checked, and still not fixed, so it won't be fixed any time soon.

I actually spoke with someone in the Bitdefender community forum last night, and they said it would definitely be best to add rust to the exceptions list.

Thank you for your feedback!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.