I have a bizarre issue that seems to be UAC related but I can't figure it out. On the face of it, it seems to be the same issue as this, but it's not quite.
I have a folder which contains the files for a VirtualBox machine. The folder is located in C:\Users\Public\Documents\VM. When launching the VM, VirtualBox complains that it cannot get write access to the VHD unless I run VirtualBox with elevated permissions. VirtualBox has write access to other files in that folder (the logs, for example) because they're being written to when trying to fire up the VM.
If I change the NTFS permissions on the VM folder, all of the files within the folder inherit those changes except the VHD file which gives me an access denied error (VirtualBox is not running and the VHD is not attached via Disk Management either). If I go into the VM folder, I can manually change the permissions directly on the VHD file, and if I disable and then re-enable inheritance, the correct permissions get applied - but the next time I change anything on the folder above, I get the same access denied error on the VHD file.
What on earth is going on? My instinct says that it's UAC but why is it only affecting this one VHD file in a folder?
EDIT: I have since deleted and re-copied the offending VHD, and the problem has gone. Absolutely no idea why that should have had any effect whatsoever, but there you go...
Mmmhhh... Interesting situation.
I have seen similar weird behaviour from VirtualBox (and VMWare as well).
Did you reboot while playing around with this ? I'm guessing you didn't. The file would probably have behaved normally after the reboot.
As far as I have been able to determine sometimes the VBox (or VMWare) device drivers (on the hosts side) keep a lock or handle dangling on the virtualized hardware. (In this case the disk image, I have seen it happen to USB devices that were mapped on the VM as well.)
This should disappear after a reboot.
What makes it really weird is that you could delete the file. Usually that is blocked as well by this problem.