1

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...

3
  • who was the owner? May 1, 2012 at 21:35
  • I tried changing it to my account, or the Administrators group. Also, changing the owner at the folder level gave the same problem as with changing the permissions - access denied on the VHD file. I could, however, change the ownership directly on the file itself. May 1, 2012 at 21:37
  • Maybe this was a bad attribute at some lower level in the filesystem? May 2, 2012 at 1:59

1 Answer 1

0

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.

2
  • Rebooted several times. Uninstalled/reinstalled VirtualBox too. But yes, very odd, especially since I could get the permissions to inherit by editing the security on the file itself. Anyway, replacing the VHD has sorted it. May 1, 2012 at 21:13
  • Mhh... I'm just as puzzled as you are. My best guess is the same as SpacemanSpiff. Some sort of malformed NTFS metadata that got deleted together with the file. A chkdsk may have fixed it too...
    – Tonny
    May 2, 2012 at 17:56

You must log in to answer this question.

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