Robocopy not copying NTFS permissions
Hi All, got a 2008 64bit server, copying a 100 GB folder from one disk to another on the same server. And randomly robocopy does not apply NTFS permissions to folders at root level. It leaves them to default. This is the command I am using:robocopy "F:\Project1" "H:\Project1" /E /Copy:DATSOU /IS /IT /log:c:\Project.txt /TEEWhat could be the issue ?
July 23rd, 2009 6:51am

Hi Ron1n,Try adding /SECFIX to your list of switches. You may need to delete the recreate the root folders as well so that Robocopy can create the folder with the correct permissions properly. Also, keep in mind that robocopy does NOT copy inherited permissions.Your command should look like this: robocopy "F:\Project1" "H:\Project1" /E /SECFIX /Copy:DATSOU /IS /IT /log:c:\Project.txt /TEEAlso.. You're using the robocopy.exe built into Win2K8, correct?
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2009 10:53pm

Hi Anthony,thanx a lot for for ur reply, I will give that command a shot. Your comment that robocopy does NOT copy permissions means that if FOlder 1 in F drive has a specific NTFS permission applied then folder3 will not get it if the whole folder structure is copied to another drive ? c:\folder1\folder2\folder3 yes I am using the built in robocopy in Windows 2008.
July 25th, 2009 2:12pm

Hello, If we want to robocopy the whole d:\project1 and all the subfolders to H:\project1 while preserving its NTFS security permission, we can use following command syntax with robocopy. Example: ============= Robocopy "F:\Project1" "H:\Project1" /E /SEC /e: Copies subdirectories includes any empty directories. /sec: Copies files with security. For more reference, please refer to: Robocopy http://technet2.microsoft.com/windowsserver2008/en/library/d4c6e8e9-fcb3-4a4a-9d04-2d8c367b63541033.mspx?mfr=true Hope this information will be helpful.This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
July 27th, 2009 9:29am

Hi David,I have tried that and it does not copy AD security groups at all (specially inherited permissions), just leaves them with default security settings.
July 27th, 2009 1:52pm

Hi Ron1n, Thanks for your update. I built a local test environment, and try to reproduce your issue by failed. We can copy folders including the ACL of AD security group with the local test environment. Can you please check to see if you logon as the user account which has write privilege to the target folder when you perform the copy operation? Robocopy "F:\Project1" "H:\Project1" /E /SEC Hope it helps.This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
July 28th, 2009 10:52am

Try to use copy all switch. As he mentioned, check that you have full rights to write into folders. I faced lots of issues with this. Also, i had issues when I was copying data from local disks to SAN disks. Are you both disks are local?
July 30th, 2009 5:39pm

Hi David,I tried with /SEC as well and no luck. The same command works fine on Windows 2003 Sp2 R2, but actsfunnyon Windows 2008 SP2.This is a SAN disk to SAN disk copy and I have full admin rights. To restoreNTFS permissions,I dumped permission from the old share using SetACL and dumped them back to the new share. No luck. Surprisingly, both SetACL and Robocopy do not log any errors and report that they completed successfully but the folders that had not copied permissions previously remain the same. Finally I tried icacls. http://support.microsoft.com/kb/919240And it worked 100% with permissions. it copied the permissions to afile correctly and appliedthem correctlly as well to the new root share. In the Kb for icacls it says "The Icacls.exe utility resolves various issues that occur when you use the existing utilities. " So what is fixed ? or changed in Windows 2008 that is breaking pretty much all other utilities that copyNTFS permissions ?
Free Windows Admin Tool Kit Click here and download it now
August 3rd, 2009 7:56am

Hi,I am sure that this problem is because of SAN disks. I faced problem while copying local disk data to SAN disk using robocopy. It didnt carry permission and failed lots of times. To confirm, try to copy data from local disk on 2008 to local disk.Amol
August 3rd, 2009 3:47pm

How can the size of the SCSI cable affect the NTFS permissions?
Free Windows Admin Tool Kit Click here and download it now
October 15th, 2009 6:18pm

The best way to copy security is to use the /B and /COPYALL switches together. /B specifies that the backup right is used to copy the files, this bypasses the security and preventing errors. Thus, files the user doesn't even have access to are copied as well, with security in place./IS and /IT aren't needed.I have a batch file that i repeatly use to copy security using Robocopy to Mirror folders for migration on SAN servers. Here are all the switches. Contrary, the syntax I always specify the Source and Destination after the switches.ROBOCOPY /B /NOSD /NODD /E /V /TS /FP /COPYALL /MIR /PF /W:10 /R:3 /XF S:\Source D:\DestinationSAN disk isn't the issue. However, the 2008 of robocopy may be...i haven't used it. Try the XP010 version available for download from Microsoft.As an alternative you can also use XCOPY to copy security.The appropriate switches are herexcopy S:\Source D:\Destination /s /e /x /c /q /h /k /i /r /Y
November 1st, 2009 2:04am

The best way to copy security is to use the /B and /COPYALL switches together. /B specifies that the backup right is used to copy the files, this bypasses the security and preventing errors. Thus, files the user doesn't even have access to are copied as well, with security in place. I agree as above Robocopy (/B or /ZB) /COPYALL on W2K8 R2 and to SAN disks works, no problemoCheersLM
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2010 8:01pm

Hi,I am sure that this problem is because of SAN disks. I faced problem while copying local disk data to SAN disk using robocopy. It didnt carry permission and failed lots of times. To confirm, try to copy data from local disk on 2008 to local disk. Amol Hi Amol, yes it was the SAN. Well to be honest it was the firmware on the controllers that caused the issue. However, it was extremely difficult to isolate.
March 15th, 2010 2:20pm

SAN disk isn't the issue. However, the 2008 of robocopy may be...i haven't used it. Try the XP010 version available for download from Microsoft. After hours of banging my head against this wall, I read the above line...grabbed a 2003 copy of robocopy and BINGO! worked like a charm. Robocopy 2008 did NOT copy the permissions regardless of the flag (e.g., /SEC or /B or...).
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2010 12:39am

The /B was required for me to copy over permissions to a Windows 2008 server. This is needed whether you use /Copy:DATSOU or /COPYALL. Gunner999's response is not marked as an answer but I have proposed it is marked as an answer. Michael
January 20th, 2011 7:46pm

Of all the options suggested here /zb /copyall was the only one that worked for me on 2008R2 to 2008R2 both local disks vs SAN.
Free Windows Admin Tool Kit Click here and download it now
March 3rd, 2011 4:17am

This one worked for me in the end on Win2K8 R2 std:- ROBOCOPY /B /E /COPYALL /W:0 /R:0 S:\Source\path \\Destination\share. SAN or local disk was irrelevant.
March 23rd, 2011 7:33pm

Did you try disabling the UAC? or you can try the /MIR option. be carefull with the /MIR option
Free Windows Admin Tool Kit Click here and download it now
May 2nd, 2011 12:44am

Another vote for /B. We use robocopy for migrations and do it in 3 steps, create, copy files, copy security. Allows fixing broken permissions on the source before copying them to the destination. Final step: ROBOCOPY /SOU /B source destination
June 16th, 2011 2:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics