1

I have an issue where every once in a while I get an access denied error when attempting to delete or rename an executable. I'm running Windows 7 Ultimate 64-bit and I'm only working with files within my user's directory (documents, downloads, etc.).

When I get the access denied error in Windows Explorer, it will say that it is in use by another application. So I open up Process Explorer and search for anything that has that file opened and nothing ever does. However, it appears that this is a file permission issue.

If I right-click the file and go to Properties -> Security, I see a message that says:

"To continue, you must be an administrative user with permission to view this object's security properties. Do you want to continue?" Note that I am an admin user and I am the user that created the file (UAC is enabled). If I click the Continue button I get another dialog with this message: "You do not have permission to view this object's security properties. To view its security properties, you can try taking ownership of the object. As the owner, you can also control who gets permissions on the object. Please note that once you take ownership, the previous owner might not have access to the object. To try taking ownership of the object, select an account from the list, and then click OK."

So I select my user account, click OK and I get an access denied error.

Somehow the file permissions on this file has been completely removed. This is so strange since the files that I'm working with are often files that I've created myself (compiled from Visual Studio, downloaded an installer via Firefox, copied a file from a network drive or USB stick, etc).

What's even stranger is that if I had tried to delete the file initially, which resulted in the access denied error, I'll end up poking at the permissions for a bit, Google for a couple minutes, and finally I notice that the file is all of a sudden gone. So I'm stuck with this broken permission and I can't do anything with the file until about 5 or 10 minutes later when it magically disappears.

At first I suspected that my antivirus software was the issue (I'm running Microsoft Security Essentials). However, I've tried disabling it and completely uninstalling it and I still have the problem.

Any ideas of what might be going on here?

2
  • This sounds kind of ugly. Backup now. Could be a virus, file corruption from hard drive issues, or who knows what. Before you go any further, get a good solid image of your drive please.
    – rtf
    Commented Jul 26, 2012 at 16:19
  • I keep pretty good backups, thanks for the advice though.
    – Rich
    Commented Jul 26, 2012 at 17:03

2 Answers 2

1

Check that you have the EFS, Encrypted File Service, enabled (lsass.exe). After I turned this on it resolved my issue.

For me it was causing intermittent permission errors. Which is a pain because I'm constantly recompiling binaries and have to wait a minute for the error to clear so I can recompile.

0
0

Did you run a complete chkdsk on your filesystem? Security descriptors can become corrupt, and Windows doesn't always automatically detect certain badness in the filesystem. Sometimes there can be problems with the filesystem that aren't even caused by hardware errors which are still not detected until the next run of chkdsk.

I was going to suggest disabling your virus scanner's real-time scanning feature but you seem to have beaten me to the punch by uninstalling it.

Aside from chkdsk, the only other thing I'd recommend that you haven't already tried is to check the SMART status of your HDD (using a program such as gsmartcontrol or any of a myriad of others) to make sure your disks are OK.

4
  • I just tried gsmartcontrol (neat tool, btw) and it showed that everything passed (I even ran the more extensive tests). I'm going to try chkdsk the next time I reboot and I'll report back. Thanks for the suggestions.
    – Rich
    Commented Jul 26, 2012 at 21:44
  • I ran chkdsk and it did its thing when I booted up this morning. Unfortunately it didn't seem to help as I ran into this problem again just now....
    – Rich
    Commented Jul 30, 2012 at 21:21
  • Try downloading Process Explorer from Microsoft Sysinternals and take a look at which programs are opening your files for exclusive access... just turn it on, run it in the background, and filter the event list by the file(s) you are getting the error on after you get the error... Commented Jul 31, 2012 at 16:47
  • thanks for the suggestion but if you read the first paragraph of my question you'll notice that I tried using Process Explorer but no process shows up. I don't believe another process is using the file. Instead I believe that something is messing with the file permissions and removing all permissions for some reason.
    – Rich
    Commented Jul 31, 2012 at 19:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .