roby copy error from within server2003

Posted on 2014-08-18
Last Modified: 2014-08-19
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.
Question by:Jason Thomas
    LVL 1

    Expert Comment

    Try running robocopy in backup mode (with /B).
    LVL 15

    Expert Comment

    by:Shaik M. Sajid
    check this link

    u can try Robocopy GUI aswell

    all the best
    LVL 1

    Author Comment

    by:Jason Thomas
    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.
    LVL 1

    Accepted Solution

    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.
    LVL 7

    Assisted Solution

    by:Shahnawaz Ahmed
    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
    LVL 11

    Assisted Solution

    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).
    LVL 16

    Assisted Solution

    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.
    LVL 11

    Expert Comment

    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.
    LVL 16

    Expert Comment

    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.
    LVL 1

    Author Closing Comment

    by:Jason Thomas
    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
    A quick step-by-step overview of installing and configuring Carbonite Server Backup.
    This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
    This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now