During my testing of Windows 7 I have had almost no issues to report, the only things that have been of notice have been third party or driver related. Then there’s the permissions bug, this bug is so elusive that hardly anybody has reported it and nobody has a solution, not even me.
Update 1: It appears that as of build 7068 this bug may have been fixed, see comments below for details.
Update 2: There are reports the bug has reappeared in the RTM build, it can also occur in Windows Vista but slightly less often.
Update, September 2 2009: It has been mentioned below that this website has a possible fix and that it can fix both Windows Vista and Windows 7. I don’t get this bug any more on any of my machines so I am unable to verify it however.
The issue is fairly simple, occasionally after running a file from the Desktop or a subfolder thereof I am fairly certain the file does not have to be run first though, it just happens more often if it is, (usually a setup program, but can be something as simple as a small test application) upon attempting to delete the file you get:
1. The UAC dialog wishing to confirm the deletion pops up, you click Ok (if UAC is off or disabled then go to straight to step 2)
2. An error message pops up exclaiming that you must get permission from the owner, or that you must be an administrator, it will give you the option to try again or skip.
3. Clicking try again pops up the same message, over and over and over again.
4. The IT admin in you gets confused “But I am the administrator, my user is a member of the Administrators group”
5. There must be some mistake, you attempt to grant yourself ownership of the file by right clicking and….
6. Right clicking results in a wait of more than 30 seconds during which an attempt to do anything else in the explorer window will cause Windows to assume that it has at least temporarily stopped responding, also it will then cause the menu to disappear as soon as it comes back.
7. Once you have worked this out, you click Preferences and go to the security tab where you normally change ownership, upon viewing the ownership screen you stumble upon the message Current owner: Unable to display current owner, not uncommon when the file is created on another computer etc. On attempting to change owner to yourself you get the message ‘Access Denied’.
8. You go for more advanced deletion methods, unlocker, unlock, using the command line for every windows based ownership, takedown command you can find, nothing will make the file move.
9. You may give up, don’t worry the file will magically delete itself after about 30 minutes or so, also if you restart the file will also disappear.
This is very frustrating when you are doing things that require the deletion of exe files often.
The file doesn’t work with any kind of logic, once it’s locked it will be unable to be deleted until Windows (I’m assuming it’s Windows, or whatever causes the problem in the first place) decides to delete it.
It seems that the action of attempting to delete the file in the first place is what gives it these permission-excluding superpowers, before the attempted deletion the file will act correctly, opening and closing when you want, renaming and copying as you please, obviously with no indication of what it will do if you try to delete it.
This happens on the desktop, I really haven’t experienced it anywhere else, it may also occur in the user folder but I haven’t checked.
Running as the administrator, either by opening explorer as an administrator or by enabling the administrator account and then logging in with it will give sufficient permissions to delete this file.
This is unlike any permissions issue i have ever come across on any operating system, every file is deletable, even if you have to go as the root or admin account, this file however disobeys every possible windows based and 3rd party command thrown at it.
There are no disk errors, at least none found by chkdisk, restarting and running /r on my main drive is a little counter productive since as soon as I reboot the file will be gone so there will be no file issue to be found, for the record though, I have, no issues.
This is not the same as the issues people have in Vista and Windows 7 where folders can’t be deleted sometimes, as they can be deleted simply by taking ownership of them, or even by deleting the files in the folder individually.
I have submitted a bug report.
Software I have installed and have been run:
MS Visual Studio
RealVNC
iTunes
Quicktime
Firefox
Battlefield 2
Adobe Digital Editions
TextPad
7-Zip
Foxit Reader
Avira Premium Security Suite
VideoLAN
TortoiseSVN
Windows Live, :Just the messenger
CCleaner
Most importantly, I have formatted and reinstalled Windows 7 as previously I had upgraded from Vista and there seemed to be a possible link between upgrading and getting permission issues but now I’m not so sure.
If anybody has any information on this issue please comment below, does it happen to you? Do you have a remedy that works for you? Does it happen when you have performed a full install or an upgrade from either Vista or a previous build (!important!)? Do you have any of the same software installed as me? I’m taking particular interest in CCleaner and Avira here.
Hi Peter, so far there hasn’t been any fix for it. Re-installation hasn’t fixed the problem for anyone yet so I wouldn’t recommend giving it a go unless you’re really willing.
I have this same problem in build 7100 with a video file on the desktop. After deleting it, it comes back after 10 seconds. I can’t watch it, though, because the video player says something like “file not found”. Windows also says I don’t have permissions.
Does the error continue after you restart the computer?
Hey guys,
I noticed this discussion when trying to search for a solution to a similar problem on W7 RC build 7100 x64. This problem, however, occurred after setting up a HomeGroup after I had installed the same W7 build on my laptop. The bad thing about this situation is that the problem is not with a file but with c:\ itself. It’s completely inaccessible under the same conditions listed in this article, even after hours of administrator command prompt takeown and icacls fiddling. Not even allowed to restore!
Besides that, it results in previously installed programs not being able to run as they dont have permission to write to c:\, even as administrator with full rights.
The frustration is indescribable!
I also just experienced this on build 7600.
An exe file, downloaded with Filezilla via ftp, onto a subfolder of the desktop.
I can’t delete, read, or take ownership even from an elevated command shell.
This is a serious bug for an RTM build…
I have been experiencing for a long time now and I have found that the only way to fix the “can’t open” error, where even if you give yourself permissions you still can’t access the file, is to copy it and delete the “locked” one. I had to do this for my entire music/video library and the pain is excruciating.
I have the same problem, Andy, and stumbled onto this thread looking for a solution. I do NOT want to do a clean install of RC 7100. The problem began when I was fiddling with Homegroup, trying to get the machine to see another RC7100 in my home network. Hope someone can help.
I have actually had some similar problems in the past with Homegroup messing up my permissions, I won’t touch it and will disable every part of it on a new install now to make sure it doesn’t happen.
I found a solution to my particular form of the problem here:
http://social.technet.microsoft.com/Forums/en-US/w7itproinstall/thread/85b02262-6856-4dbd-981f-0744a0791ab4
I hope it works for you guys too!
When I first fixed it, the problem ending up coming back in a milder form, but then it disappeared again without me doing anything. Since then i have turned off UAC all together and have not looked back since. But see what works for you guys.
I found an answer to the problem I was having here:
http://social.technet.microsoft.com/Forums/en-US/w7itproinstall/thread/85b02262-6856-4dbd-981f-0744a0791ab4
It involves editing the registry to remove UAC restrictions. Also I noticed that windows update installed a fix directly related to this problem today. The update is called KB972407. I’d suggest trying the update before the regedit, as the problem did resurface for me, so I ended up turning UAC off permanently. Hopefully the hotfix will address it permanently.
Hope this helps! Post back if it works (=
Get it here:
Update for Windows 7 Release Candidate (KB972407)
Update for Windows 7 Release Candidate for x64-based Systems (KB972407)
As the name suggests this is for Windows 7 RC, it has probably already been fixed in RTM.
Wow, I just ran into this issue, I also have visual studio 2008 and noticed this bug when it wouldn’t overwrite an EXE file I had just compiled and ran. Now it happens on any EXE file on the system, sometimes I can delete them sometimes not. I looked in process monitor and the files are marked as DELETE PENDING. So obviously the files are trying to be deleted but aren’t. According to microsoft DELETE PENDING means not all handles have been closed, however I looked in another application to see if any open handles to the files existed and they did not.
This just happened out of the blue, I had been running Win 7 7100 for months doing the same thing with no problem. What changed? Who knows.
I’m also on Win7 x64, 7100 just so people who follow this can find it.
Things I’ve tried that don’t work
1) Disabling write caching
2) Uninstalling every extra driver outside of the video and sound ones
3) Removing luafv file system filter driver
4) Disabled all services like readyboost, etc
Nothing works, you cannot take ownership of these EXE files. The weird thing is sometimes they do get deleted instantly sometimes not. The other weird thing is it only happens with REAL exe files, renaming a text file to EXE doesn’t make this weird issue happen. So there is something in windows 7 that is freaking out on EXE files when they are read and keeping secret handles open to them.
Ok I think I may have found a solution after spending the whole day on this problem.
“Application Experience” service. Since enabling that I haven’t had this issue. If the problem comes back I will report back here. But thank FU@#$@#@#@#@ it has gone for the time being.
BTW I found the information about this service from this website
http://www.retrocopy.com/blog.aspx?post=28
I hope it helps someone else!
Thanks for the valuable information, I’ll put it up the top.
I had heard of the Application Experience service when I first experienced this problem however it was suggested to disable it instead, which now seems may have made the problem worse.
Also it appears the service is started only when required as it’s set to Manual on Windows 7 RTM and is in the running state on mine at the moment without me manually starting it, would it help some people to set it to Start Automatically in cases where it doesn’t start when Windows requires it?
I enabled it once and then disabled it (testing) and didn’t get the same issue until reboot. It might kick start some driver the first time it loads or something. It might also only start when new applications run also (when in manual mode), anything that didn’t change in the cache would likely be fine I’m guessing. New files created or dropped that aren’t in the cache will have issues unless that service is running.
Enabling Application Experience fixed the bug for me!!! =) im so happy now!!!!!
btw, check this out:
http://www.blackviper.com/Windows_7/Services/Application_Experience.htm
I’m having a similar issue but not with exe-files so enabling Application Experience didn’t fix my problem. When saving a file in Photoshop CS4 for a second time I often get an error message saying “Filename was not valid”. When trying to save again I get “Could not save, the file is locked”. At this point I have two options:
1) Wait for about 10 – 15 minutes and save normally.
2) Save with another name and delete the original file.
To make things more interesting it’s not mere Ps issue. When saving a TXT-file with Notepad for a second time I sometimes get the same behaviour, but it seems to be related to whether I have the preview pane open in Explorer (from where I open the TXT-file). So the preview seems to assign locks to previewed items. I thought there was similar behaviour with preview in Bridge but I’m not too sure about that anymore as Ps sometimes refues to save even when Bridge is not open.
Sorry for this longwinded post but seems this is about the only place with intelligent discussion about the subject.
Running 32 bit Windows 7 6.1.7600
Grab one of the popular “file unlocker” programs to see if anything has an open handle to the file. Another issue I have had recently is Microsoft thumbnail cache keeping certain files open when it shouldn’t.