Access Denied writing to Fileshare

I am using Powershell to RoboCopy files from a server with an Octopus Tentacle to a Fileshare. It is running as an Active Directory service account that does have access to the Fileshare. I can run the Powershell script from the server in the Powershell ISE as the Service Account and the files are copied to the Fileshare path. But when I execute through Octopus Server as the Step Template, I get this error.

ROBOCOPY :: Robust File Copy for Windows
15:50:41 Info | -------------------------------------------------------------------------------
15:50:41 Info | Started : Friday, May 8, 2020 3:50:42 PM
15:50:41 Info | Source : D:\Websites\OTS\App_Config
15:50:41 Info | Dest : \open-techs.local\ots\Depts\Digital\DevOps\Sitecore\OTS-QA-SCCDA\App_config
15:50:41 Info | Files : .
15:50:41 Info | Options : . /V /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30
15:50:41 Info | ------------------------------------------------------------------------------
15:50:41 Info | 2020/05/08 15:50:42 ERROR 5 (0x00000005) Creating Destination Directory \open-techs.local\ots\Depts\Digital\DevOps\Sitecore\OTS-QA-SCCDA\App_config
15:50:41 Info | Access is denied.

Has anybody experienced this issue? Why can I not write to a Fileshare with Octopus?

Hi cmuesing,

Thanks for reaching out.
I tried setting this up myself, just to see if I could reproduce the issue you were seeing based on the information you have provided.

I managed to reproduce the issue, but it was only after limiting the share permissions on the destination to “Read Only”.

Can you provide me the following information:

  1. What ACL permissions does the service account have on App_config?
  2. What Share permissions does the service account have on the \open-techs.local\ share?
  3. (if it’s relevant based on the ACL permissions) who is the owner of the App_config folder?

Also, in relation to your Octopus Instance:

  1. What version of Octopus are you running?
  2. What is the Source Server O/S and Destination Server O/S?
  3. Are both servers on the same domain and does the Service account have similar access to each server?
  4. What was the command you ran within Powershell ISE that worked?

We haven’t had anyone mention this particular issue before.

Thank you and I’m looking forward to your response.



Your questions led me to the answer. Even though that service account has permissions to run the Octopus Tentacle, it did not have permissions to the folder I was trying to copy from. I incorrectly assumed the issue was on the destination file share. Thank you very much for your assistance.



This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.