Moving subfolder of a shared folder, does not retain permissions




When you move a folder within the same volume, NTFS permissions are supposed to be retained. As a matter of fact, that is the only way permissions can be retained during copy or move operations. If you move a folder to another volume, or copy a folder from one location to another (on the same or different volume), NTFS permissions are not retained. But I have encountered that even when moving a subfolder of a shared folder, within the same volume, the permissions will not always be retained.

When you share a folder on Server 2008 R2, it gets marked as shared. If you check in the details pane, it will show the folder’s state as shared.
share1

But sometimes you might see the same state for a subfolder of the shared folder.
As you can see the E:\Data\Sales folder on my file server is marked as shared as well.
share2

While another subfolder of the same shared folder, E:\Data\Managers is not marked as shared.
share4

Now, you might think that this is because I have shared E:\Data and E:\Data\Sales, but that is not the case.
The only shared folder on my file server is E:\Data

share3

So why is E:\Data\Sales also marked as shared? While E:\Data\Managers is not. Its due to explicit NTFS permissions being set on the E:\Data\Sales folder.
share8

While E:\Data\Managers only has permissions that are inherited from its parent.
share7

If you try to move E:\Data\Sales to another folder, you’ll get the following message
share5

If you click Continue on the Message Box, the NTFS permissions of the Sales folder are supposed to be retained. But I have rather seen one of the following two occurring,

1. The NTFS permissions of the Sales folder are actually retained.

2. Deny permissions will be retained, the user performing the move action will gain full control permissions on the folder, and any permissions assigned to local administrators group of the server will be retained. All other permissions will be lost.

Obviously number 1 is what we would like to achieve in a situation where we ware moving the Sales folder within the E:\ volume, but I really can not pinpoint what occurs due to which condition, so you might think the NTFS permissions of the folder you are moving within the same volume will be preserved, but you might end up with a whole different set of permissions. And if you have several subfolders beneath the folder you are moving, its really not a chance you want to take.

Workaround

The workaround is quite simple. Don’t move the folder by using Windows explorer, but rather use the move command in command prompt. If you use the move command, the folder will retain its permissions every time.

The syntax for the move command is quite simple, move source_folder destination_folder
To see the full syntax of the move command, Write move /? in the command prompt

Command for moving the Sales folder beneath E:\Data\Managers
share9

As you can see the NTFS permissions for the Sales folder has been retained
share10

1 Comment

  1. ac

    Helpful, thanks!

    Reply

Leave a Reply to ac Cancel reply

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload the CAPTCHA.