Robocopy error ERROR 5 Copying NTFS Security to Destination Directory

Discussion in 'Windows XP' started by nikkiandmidgets, Feb 24, 2007.

  1. nikkiandmidgets

    nikkiandmidgets

    Joined:
    Feb 24, 2007
    Messages:
    1
    Likes Received:
    0
    Hi, I have to carry out 2 data migrations this weekend and keep encoutering the error below when using robocopy:

    ERROR 5 (0x00000005) Copying NTFS Security to Destination Directory i:\DATA\
    Access is denied.

    I added myself into the owner group for all area of data I am moving (Source and destination) earlier this week, and can copy files manually with right click copy\paste option so do not understand why I am getting this error. The users still have access to the source area but will not get access to the destination area till final copy is complete.

    Running several jobs, all failing! Here are the two sets of option I am using for my two different jobs:

    /mir /copy:dato /np /r:3 /w:5 /log+:datacopy_2402071500.log and
    /e /copy:dato /np /r:3 /w:5 /log+:data2copy_2402071500.log

    Our Server support moved to KL and this is not included in core business so up to us onsite support guys to help customers with data moves. I have been on maternity leave for two years, not long back and have lost all my notes and scripts I previously had cos they deleted my original account! So could be just doing something supid thats easily resolved - well thats what I hope anyway as need to get this data moved this weekend!

    Thanks for any advice!
     
    nikkiandmidgets, Feb 24, 2007
    #1
    1. Advertisements

  2. nikkiandmidgets

    Rathain

    Joined:
    Mar 5, 2007
    Messages:
    1
    Likes Received:
    0
    Your destination ACL may be getting deleted

    Hi there,

    Sorry for the late reply, I came across your post when researching a similar problem. My first suggestion would be to make sure that you are explicitly in the share and NTFS ACLs at both source and destination. Make sure you check this before and most especially AFTER you get this error.

    In my case, I started out with full control on both the source and destination shares. The problem was that Robocopy was resetting the ACL on the destination share to a null value (nobody has permission) before it began recursing subdirectories. After some quick tests, my conclusion is that Robocopy does not handle inherited permissions. Say you are copying C:\Share1 to D:\, and C:\Share1 is inheriting its permissions from the C:\ root directory, it actually has no explicit ACL. Therefore, when you copy its ACL, you are actually copying... nothing. By copying an empty ACL to your destination your permissions are removed in the first step of the copy, and all subsequent writes to the share fail with Error 5.

    This is only a problem when you are copying from a source which you are accessing WITH inherited permissions and a destination which you are accessing WITHOUT inherited permissions. If you copy C:\ (which has you explicitly in its ACL), to D:\, there is no issue. If this is indeed your problem, you can resolve it by adding yourself explicitly to the source ACL with full control. When the copy runs, your ACL entry is duplicated to the destination, and the subsequent file copies can be written. You can undo your changes (on both source and destination) after the copy completes.

    If you continue to have problems despite the above, you might want to consider trying the /B switch, which attempts to back up the file using your privileges as a Backup Operator. This will allow you to copy files that you otherwise couldn't, for example, if you are not on the ACL on your destination share. Robocopy defaults to attempting a restartable copy. By giving up restartable copies the worst case is that you lose the file currently being transferred in the event of a disruption. The next pass will restart that file from its beginning instead of partway through.

    Hope that helps. Here's a quote from Microsoft's Robocopy doc regarding the /B switch:

     
    Last edited: Mar 5, 2007
    Rathain, Mar 5, 2007
    #2
    1. Advertisements

  3. nikkiandmidgets

    Andyjad

    Joined:
    Oct 16, 2010
    Messages:
    1
    Likes Received:
    0
    Hi,

    I'm facing the same issue too. Access denied with error 5, even with /zb parameters.
    We have to go down to individual folders n sub folders to take over ownership, before robocopy can move files successfully.

    Any easier way to do this? Because there's like ten over thousand subfolder within main folders, we'll take ages to assign this rights.

    Thank you..
     
    Andyjad, Oct 16, 2010
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. newbuilder
    Replies:
    5
    Views:
    1,544
    newbuilder
    Sep 19, 2003
  2. almeida

    From NTFS to FAT32

    almeida, Jun 7, 2005, in forum: Windows XP
    Replies:
    2
    Views:
    631
  3. pantz2001

    Errors whilst converting from FAT32 to NTFS

    pantz2001, Jul 2, 2005, in forum: Windows XP
    Replies:
    1
    Views:
    586
    Skinz
    Jul 2, 2005
  4. sandeeptiware

    How to use RoboCopy ....

    sandeeptiware, Jun 1, 2007, in forum: Windows XP
    Replies:
    2
    Views:
    7,106
    sandeeptiware
    Jun 1, 2007
  5. KitWalker
    Replies:
    0
    Views:
    2,482
    KitWalker
    Dec 21, 2008
Loading...

Share This Page