3

Introduction: I'm attempting (and in part succeding) in replacing a number of folders with mounted VHDs in Windows Server 2008 R2, in an attempt to emulate UNIX' bahaviour with bind- or loop-mounts. This has proven to reduce a number of problems related to extreme fragmentation due to a mix of large and small files and the occasional and unpredictable rewriting thereof. (A third party app is doing what it wants, and I don't have the power to stop it.) It also makes it possible to snapshot in a reasonable way without duplicating everything.

The images are obviously regenerated as needed after the app breaks everything. (cp -aT oldmount newmount)

Problem: If the VHD image contains a NTFS filesystem, Windows requires administrator perms in order to create files (but not folders) in the filesystem root directory. This breaks the app when it attempts to make such files. (No, it is not an option to make the image root one folder up in the hierarchy). Thus far, I've solved this by using vFAT filesystems, which don't do any perm checking, but it would be very nice to have a few of the NTFS features like sparse files and per-file compression.

I have tried fiddling with the perms I could think of, but "Full control" does not entail creating files, as far as I can tell.

TL;DR: How can I goad Windows Server 2008 R2 into letting users create and write files in the top-level directory of a mounted NTFS file system?

Addition: The app runs as my normal user ttbomk. I gave my both "Everyone" and my user "Full control" permissions, and set my user as the owner of the mount point (the root folder of the mount). I can create folders and edit existing files with no problems, but when creating a file (right click, new, text document) I get a UAC confirmation dialogue with title "Destination Folder Access Denied", text "You need to confirm this operation.; [name(not path) of mount]; Date created: [Creation date of mount]" and options to Continue, Skip or Cancel. When creating a file manually like this it's just an annoyance. The app just fails, silently for a while then with great spectacle when the unwritten data is needed.

1
  • Full Control = write files. Perhaps you should be more specific. What account did you assign permissions? What context does this app run? What is the exact error you get?
    – surfasb
    Nov 30, 2011 at 16:10

1 Answer 1

-1

Let me subsume what you are doing:

You create VHD files and mount them into empty folders on your system. The problem is that an app tries to write to the root-directory of the mounted VHD file - which fails.

In general you should be able to modify the permissions of the NTFS files structure inside the VHD file. May be the Windows explorer has a problem to distinguish between the NTFS permissions of the empty folder you have mounted the VHD in and the permissions of the NTFS root entry inside the VHD.

I would suggest to mount the VHD as a drive (just for testing) and verify that the permissions inside the VHD are correct. Also check the NTFS permissions on the empty folder when the VHD is not mounted.

2
  • 1
    Thanks, but nevermind, figured it out. Turns out there are permissions for the "partition" available from the "Disk management" UI. I / You need "Write" permission on the partition as well as the mount point to create files on the root folder mount. Also, I'm not allowed to answer my own question, so I've just written it here. =(
    – Eroen
    Nov 30, 2011 at 16:40
  • 1
    @Eroen: We can change that by flaggin down a moderator.
    – surfasb
    Nov 30, 2011 at 23:04

You must log in to answer this question.

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