I'm attempting to copy a directory tree, maintaining its ownership information using the command:
XCOPY S:\ProjectsDefault\Template\admin S:\Projects\00\111\admin /S /E /I /O
the command gives an Access denied
error message, and while it does create the directory tree, the ownership and ACL information is not copied.
This is being done on a Windows 2008 R2 Server which has mounted a share from a Windows 2003 R2 domain controller. The user has been been granted full access to the share and is a member of the Domain Admins
security group.
Oddly enough, the command does work if performed on a different (Windows 2003 R2 Server). (It also works if done using the Domain Administrator account on the 2008 server.)
Have you tried running your command shell as Administrator? Some of your privileges will be filtered away by the UAC.
Personally I like robocopy more than xcopy. Robocopy is a bit more robust., and also has better logging capability. The command you will need to use will be like this then:
See here for more information about robocopy.By the way isn't there a spelling mistake in Tempalte (instead of Template) Robocopy