Link to home
Start Free TrialLog in
Avatar of larpo
larpoFlag for Sweden

asked on

ROBOCOPY permission copy problems...

Hi

I have been around the net looking for an answer to this problem, but with no
luck... And I have also posted this question on technet newsgroups, but still no answer so i will try and see if someone here can help me out in this matter.

Im trying to copy data from server1 over a 10MBit WAN connection to server2
wich is the backupserver.

I want to copy all project data with all permissions and dates from server1
to server2.  Both servers running server 2003 (R1)

I have been trying this out with robocopy version  XP026.
I have set up a temp directory on both servers for trying this out.

On server1 there is some two permisions set. one is domain administrators and the
other one is a group lets call it company_employees in ActiveDirectory that is set on the E: drive itself and therefor is
automatically set on the root foolder and all underlying folders as well when i created a new testfolder.

When im doing this with the initial run it copies all files, but it doesnt
retain the two permissions, instead it sets the permissions that i
automatically created on server2 when setting that root folder up. The folder
on the destination server2 is on D:

If i add another person on server1 it will in the second run copy/add the new
permission correctly to server2, if i erase the permission, it will also erase it
correctly on server2. But still leave the faulty permissions it picked up from the first initial run.
But i cant get it to copy the permissions that is set up from start, why is
this???

If I do the same procedure with robocopy XP010 it DOES work, it copies the
right permissions with no problems, BUT i cant get that version to correctly
copy time stamps on folders! It looks like this is a problem that i fixed in
version xp026 with the /DCOPY:T switch that doesnt exist in version xp010....

And with further testing I have found one cause that is a problem in xp026, IF the folder i am
copying from, is a folder that is set to "Allow inheritable permissions from
the...." in the advanced security tab, then it wont take the permissions
correctly over to the new backupserver. But unchecking this makes it work....
but this seems odd to me, is this a demand that it will work only with that
set??!


Anyone out there that can help me with this? I would be most grateful! It wuite urgent that i get this up and running as i need to backup this server ASAP, thats why i have givien this question a high value of points.

Best Regards
Perra

Avatar of oBdA
oBdA

In my experience, robocopy seems to have some problems creating the permissions on the target folder 8when copying permissions).
Before you start the copy, create the target root folder (the one you're specifying in robocopy as second argument), remove inheritable permissions, and set it to the same permissions that the source folder has. Permissions in subfolder should be copied correctly.
Avatar of larpo

ASKER

Hi

Thank you for the swift reply! Yes removing the inheritable permission on the source folder does get rid of the problem, I dont seem to be needing to create the directory in advance either, its just creates the right permissions on the target as well... at least as much as I have had the possibility to test this setup out.
I tried to set the target folder with the same permissions on just the target folder, but when copying (with inheritable permissions still on the source) and that didnt work, but maybe you ment to remove inheritable permission on the source as well? And if I do that, that will work, but that i already tried out, and hoped it would be a solution for this... But i do not absolutely need to have that set on my sourse folders on the source server so now that is turned off, and  it seems to be working.

A microsoft tech has also confirmed that the inheritable permission copying is most likely a problem in XP026 and later versions, and the tech has forwarded the question to their "product group", but i dont think they will come up with a fix for this problem right away... maybe in a future version...

So the bottom line is, there is no wasy of having the root folder as a inheritable permission folder, cause the xp026 version will not handle that... and i guess that is that...

Thanks for the reply!
Best Regards
Perra
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

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 larpo

ASKER

Hi again,
I have done some experimenting, and I have now no folder that is in the root using inheritance, and with version xp026 i am running the following command:
robocopy \\srv1\E$ \\srv2\d$\E_DISK /mir /ZB /nfl /ndl /copyall /r:1 /w:1 /np /dcopy:t

This seems to be taking all dates and securitys over as it should, with the one thing that its not working if o have the inheritance on a root foler in e: on the source, but i have accepted that fact now and will be trying this for the next couple of days...

Thanks for the advice oBdA, i will award u the points for helping me with suggestions!
/Perra