Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

Have you tried running your command shell as Administrator? Some of your privileges will be filtered away by the UAC.

share|improve this answer
    
I was hoping to be able to grant the approriate rights to the user, rather than use the Adminsitrator account - the odd thing is that it only seems to fail on the 2008 server, so I suspect there is something I'm missing with my security setup. –  darklion Mar 17 '11 at 3:47

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:

robcopy "S:\ProjectsDefault\Tempalte\admin" "S:\Projects\00\111\admim" /e /copyall

See here for more information about robocopy.By the way isn't there a spelling mistake in Tempalte (instead of Template) Robocopy

share|improve this answer
    
Robocopy is quite useful, though it also has the same issues - I used /COPY:DATSO rather than /COPYALL. (Fixed the spelling mistake, but that was only a transcription error.) –  darklion Mar 17 '11 at 3:50
    
What is the exact error message you are getting? Have you also checked that you have the approriate permissions on the source and destination? –  Guido van Brakel Mar 17 '11 at 12:09
    
Access Denied. I have permissions to create the files/directories; indeed there are no error messages if I do an XCOPY /S /E /I. –  darklion Mar 18 '11 at 8:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.