Robocopy error ERROR 5 Copying NTFS Security to Destination Directory

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

  1. nikkiandmidgets

    nikkiandmidgets

    Joined:
    Feb 24, 2007
    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
    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
    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. muckshifter

    Windows XP Ad-aware 5.7 Available

    muckshifter, Mar 27, 2002, in forum: Windows
    Replies:
    0
    Views:
    1,600
    muckshifter
    Mar 27, 2002
  2. muckshifter

    Windows XP NEW Ad-aware 5.83

    muckshifter, Jun 20, 2002, in forum: Windows
    Replies:
    1
    Views:
    1,531
    Eric Portelance
    Jun 20, 2002
  3. Quadophile

    Windows XP WinAmp 5 Beta 1

    Quadophile, Oct 20, 2003, in forum: Windows
    Replies:
    5
    Views:
    3,008
  4. steveanrk
    Replies:
    4
    Views:
    682
    Wolfgang
    Oct 21, 2005
  5. stan_da_man

    Windows XP 1606 Error while installing Windows CE 5.0

    stan_da_man, Nov 8, 2005, in forum: Windows
    Replies:
    2
    Views:
    426
    stan_da_man
    Nov 8, 2005
  6. Ian

    Windows Vista Back in 5, upgrading to Vista

    Ian, Mar 25, 2007, in forum: Windows
    Replies:
    24
    Views:
    1,500
    crazylegs
    Mar 26, 2007
  7. Bruce Mansell

    Windows 7 Supercalc 5.00

    Bruce Mansell, Mar 13, 2010, in forum: Windows
    Replies:
    2
    Views:
    4,586
    Bruce Mansell
    Feb 10, 2011
  8. dwjones1

    Windows Vista quattro pro 5.0 wb1 files

    dwjones1, Mar 19, 2012, in forum: Windows
    Replies:
    1
    Views:
    1,760
    EvanDavis
    Mar 19, 2012
Loading...