Share via


Robocopy not copying permissions for non-inherited parent folder

Question

Friday, March 28, 2014 10:33 AM

Hi

WE have a folder structure that we want to copy with robocopy. The parent folder in the structure is set to not inherit its permissions. It has custom security permissions and all the folders within it are set to inherit, so they get their permissions from that parent. 

Robocopy creates the destination folder but sets it to inherit the permissions. This causes all the child folders to have the wrong permissions. 

The only work around we've found is to create the parent folder on the destination by hand and set the permissions, but given the number of permissions, I'd like to find a solution.

We're using "robocopy c:\shares\myfolder '\otherserver\c$\shares\myfolder' /sec /z /e"

The structure is like this;

c:\

- shares

-- myfolder <- set to not inherit permissions.

lots of sub folders

Any ideas why this might be ?

Olly

All replies (3)

Friday, March 28, 2014 10:46 AM ✅Answered

I think if you create the myfolder at the destination, and remove inheritance, then perform the copy, you should be fine. It should put the security on the myfolder for you. I've used /copyall instead of /sec to take all attributes and security across. Hope it helps

MCTS, MCSE 2000/2003, MCSA 2000/2003, CNA


Wednesday, April 2, 2014 6:29 AM ✅Answered

Hi,

I agree with DJamesS’s suggestion that using /copyall option to achieve your goal. This option should be able to let you copy all file information successfully.

More information for you:

Robocopy

http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx

Robocopy on Windows Server 2008 SP2 does not copy folder permissions

http://social.technet.microsoft.com/Forums/windowsserver/en-US/292b40ec-a6b3-47db-b9ac-e7ab9aa5c913/robocopy-on-windows-server-2008-sp2-does-not-copy-folder-permissions?forum=winserverfiles

Best Regards,

Amy Wang


Monday, April 7, 2014 3:44 AM

Hi,

Do you need further assistances on this issue by now?

If yes, please feel free to let us know.

Have a nice day!

Amy Wang