roby copy error from within server2003

Hi all. I have a large amount of data to move between 2 server 2003 servers. I am using robocopy with the following command to do some testing on individual folders before running it against the parent folder.
The command I run is
C:\>robocopy g:\SharedArea\user1 *.* "z:\user1" /copyall /mir /r:0 /tee

 Most of the data is copied but now and again I get an error:
ERROR 5 (0x00000005) Copying NTFS Security to Destination Directory g:\SharedArea\User1\profiles\Start Menu\Programs\Startup\
Access is denied.
Other folders also error area for example "accessibility", "system tools" within the profiles folder. I have checked and do not have permissions to the "profiles" folder but how can I copy it without the permission?.
I have logged onto the server as domain administrator so I can't understand the access denied error. Any help appreciated.
Jason ThomasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dardanceIT ConsultantCommented:
Try running robocopy in backup mode (with /B).
Sajid Shaik MSr. System AdminCommented:
check this link

u can try Robocopy GUI aswell

all the best
Jason ThomasAuthor Commented:
If I use the /b option will that not strip out the current permissions? I need to both copy the data and retain permissions because the new area is to become the new file share server.
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

dardanceIT ConsultantCommented:
As far as i know it only runs the copy with backup permissions in order to bypass user permissions (works just as a backup software that is able to backup files in the user folders). But test it at another folder first just to be sure :)

I can see that some people experience some problems with junctions when they run robocopy in backup mode, so i would recommend using /XJD and /XJF as well. (Source:

Let me know how it works out.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shahnawaz AhmedTechnical Services SpecialistCommented:
You must have permission on root level on both directories and inherit to the child one. So when you copy nothing is going to be left out.

I am giving you some useful links to understand the robo copy switches easily.

Please go through once
Mr TorturSystem EngineerCommented:
Hi JasonHels,
your approach is fine, just use the /ZB switch in your command and it will be fine.
/B switch could resolve your issue too, but will slow down the entire copy.

The /COPYALL flag will copy all ntfs existing permissions to the target folder, as these are 2 separate things (permissions on files and backup mode).
Spike99On-Site IT TechnicianCommented:
I'm not sure that robocopy will ever copy files & folders that you can't access normally.

By default, admins do NOT have rights to user profile folders.  There is a GPO that you can use to grant the administrators group full access to user profile folders, but that will only work on any new profiles.
See MS Technet article on policy settings related to user profiles. The one to add admin rights is called, "Add the Administrators security group to the roaming user profile share":

So, you will need to fix permissions of the existing profile folders so you can copy their complete contents.

Although, I've never tried this myself, you could set up a logon script for users that would add the admin group full rights to their profile folder.  I believe the syntax of that command would be:
icacls \\servername\profiles$\%username% /grant administrators:(F) /T

Open in new window

Or, you could run a script that will recursively reset permissions on all the profile folders in a share so that the admin group has full access.  The posts on this blog page should be of some help in writing the script to fit your environment:

I hope this helps.
Mr TorturSystem EngineerCommented:
Hi Spike99,
backup mode is a special right ; being logged as domain admin and with this /b flag, it must work.
This right is used by a lot (if not all) windows backup softwares.
If not, how would you do to usually backup user profiles/data ? you always add rights for the admins ?
From a user side it is not always acceptable that domain admin or IT guys have full rights on their stuff.
Spike99On-Site IT TechnicianCommented:
Mr Tortur,
I've never used the /b switch with robocopy: I always just fixed permissions on anything it couldn't copy.
In our environment at my last job, we used to manually create the user profile folders when creating the user accounts, so this wasn't an issue for us when we had to move user profiles to a new server.  Then, it was decided it took too long when creating user accounts, so we enabled the policy setting to give the admins group rights to the user profile folders.
Jason ThomasAuthor Commented:
Some great answers and links. I now have a much better understanding of the process so thank you to all. Hope all is happy with points split.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.