Broken NTFS permission on temp folder

I looked at a weird Windows problem this afternoon. IE would start, work for a minute or two, then die. The XP Home crash monitor would then itself crash. Trying to download anti-spyware programs (or anything) would result in a cannot-access-file message. Outlook Express would close after variable amounts of time and errors, and everything but the mouse would freeze up for minutes before coming back to life. Some programs worked ok, but others would fail to load, or die on entry.

Normally I’d say this was hard drive related, but the computer never actually crashed, just kept doing weird stuff. It just didn’t feel like hardware. Which meant spyware. I couldn’t see anything weird in task manager, but when said program closed itself I decided it was the likely cause. Only spyware kills task manager, and a scan in safe mode did indeed find a large amount. Spybot removed it all, but the problems persisted. I also noticed that the Local Settings / Temp folder was full of hundreds of files that I couldn’t delete, but that no program seemed to be using.

Eventually I googled the download error message and things began to fall into place. A common cause was apparently a temp folder with broken NTFS permissions. I created a new user and had no problems at all, so this diagnosis seemed likely. However, this being XP Home, there’s no way to check the permissions1. Unless you hack it. Which I did.

Some nutty piece of spyware, I’m guessing, had altered the NTFS permissions so that only System could access the temp directory. Resetting them fixed the problems.

Interesting one. Unfortunately I’ve forgotten the exact error message, so am unlikely to be much help to Googlers.

  1. to be fair there’s probably some command-line utility of which I’m unaware []