0

I am trying to run a copy command to transfer a Zip file from the local file system to a UNC path on a different server. The file does copy but I get the below error and exit code 1. The user has full permissions on the destination folder.

Command:

robocopy "C:\vsts-agent\_work\1\a\" "\\file-clstr\websites\" "Global.zip"

Output:


ROBOCOPY :: Robust File Copy for Windows

Started : 12 December 2017 13:36:46 2017/12/12 13:36:46 ERROR 5 (0x00000005) Getting File System Type of Destination \file-clstr\websites\ Access is denied. Source : C:\vsts-agent_work\1\a\ Dest - \file-clstr\websites\ Files : Global.zip

Options : /DCOPY:DA /COPY:DAT /R:1000000 /W:30

                   1    C:\vsts-agent\_work\1\a\
    New File         375.3 m    Global.zip

0.0% 0.2% 0.5% 0.7% 1.0% 1.3% 1.5% 1.8% ...

2

I had checked folder permissions but not the share permissions. This is what was giving the error.

  • Had the exact same issue, we also forgot to check the share permissions. Thanks for the solution. – CodeBroJohn Aug 9 '19 at 13:51
0

Adding this in case it helps anyone else... I too experienced Access Denied error with robocopy command. I verified the folder+share permissions.

What it ended up being is the user account that the source computer was running for the robocopy call was 'Local System' rather than a domain or shared local account. This built in account cannot used for network access. The user running the service could not be changed so what I ended up doing is placing the robocopy call in a batch script along with net use to map the share with appropriate account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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