Link to home
Start Free TrialLog in
Avatar of Laszlo Denes
Laszlo DenesFlag for Canada

asked on

When robocopying shared folder NTFS security permissions copy but when I share it again they all get wiped out

I am trying to copy over a file share (called groups) from a 2008 r2 server to another server 2012 and robocopy (see command below) works well for it and copies over everything and maintains the NTFS permissions. However, when I try to share the root folder out again  it resets all the ntfs permissions on all the folders again. How can I do the copying of the share (without unsharing it first at the course as it is a live folder) and then share it on another server with the same name without losing the original ntfs group permissions for all the folders in it?


robocopy "\\tghfs1\e$\groups" "d:\groups" /TEE /LOG+:c:\robolog.txt /MIR /copyall /zb /w:1 /r:2 /E
(executed on the new server - so copying from tghfs1)
Avatar of yo_bee
yo_bee
Flag of United States of America image

Share Permissions and NTFS are two different things.  Robocopy does not copy over the shared permissions.
NTFS is always being applied whether the folder is shared or not.
ASKER CERTIFIED SOLUTION
Avatar of Dariusz Tyka
Dariusz Tyka
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Laszlo Denes

ASKER

Server is different o/s and hardware so that might not be an option.
Different hardware doesn't matter. Different OS may - but I was able to export import shares between Windows 2003R2 and Windows 2008R2 using this method so you may give it a try.
It's a shame that my comment did not warrant any points. :(