Deployment fails using Service Account

I am using a Service Account to run the Tentacle service, and have given the Service Account full control over the directory being installed to (with permissions propagated to children directories). The files get copied over to the directory, but then I get the following error:

Access to the path is denied.
System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalReplace(String sourceFileName, String destinationFileName, String destinationBackupFileName, Boolean ignoreMetadataErrors)
at Octopus.Platform.Util.OctopusPhysicalFileSystem.OverwriteAndDelete(String originalFile, String temporaryReplacement) in y:\work\refs\heads\master\source\Octopus.Platform\Util\OctopusPhysicalFileSystem.cs:line 264
at Octopus.Tentacle.Deployment.Journal.DeploymentJournalReaderWriter.Overwrite(IEnumerable`1 elements) in y:\work\refs\heads\master\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournalReaderWriter.cs:line 62
at Octopus.Tentacle.Deployment.Journal.DeploymentJournal.AppendSuccessfulDeployment(JournalEntry journalEntry, ILog log, String& retentionToken) in y:\work\refs\heads\master\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournal.cs:line 29
at Octopus.Tentacle.Orchestration.Deploy.Package.TentaclePackageDeployment.StartNextProcedure(Boolean reevaluate) in y:\work\refs\heads\master\source\Octopus.Tentacle\Orchestration\Deploy\Package\TentaclePackageDeployment.cs:line 277
at Octopus.Tentacle.Orchestration.Deploy.Package.TentaclePackageDeployment.Receive(ProcedureCalledEvent reply) in y:\work\refs\heads\master\source\Octopus.Tentacle\Orchestration\Deploy\Package\TentaclePackageDeployment.cs:line 355
at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in y:\work\3cbe05672d69a231\source\Pipefish\Actor.cs:line 113
Tentacle version

I don’t know which path is getting the “Access to the path is denied” error.

Any ideas?

This deployment works fine when using the local account to run the Tentacle service.

Thank you,


Thanks for getting in touch! There is one more directory you will need to give access to for this user: C:\Octopus\Applications.Tentacle it contains the DeploymentJournal.xml which is required for deployments.
(Note that the path may be different if you installed Tentacle to a custom path, but searching for the .xml file should give the correct location).
Granting these permissions should resolve your issue.

Please let me know how this goes!

Hi Vanessa,

Thank you for your response. Unfortunately, the service account already has access to the folder that contains DeploymentJournal.xml, including the DeploymentJournal.xml file itself, so that isn’t the issue.

Here is a screen capture that shows the permissions.


I have four instances of tentacles on this server, and am testing the “Dev4” tentacle with the service account.

Thank you for your help! Please let me know what else I can troubleshoot…


Hi Ksato,

Thanks for the reply. Could you try to do the following using the script console in Octopus for that Tentacle
remove-item G:\Octopus\Applications\Dev4\.Tentacle\DeploymentJournal.xml
If you cannot run this command we would think that part of the path is not available for that user.

Let me know how that goes.

Thanks, Vanessa. Yes, there was a problem running that command as well. I was able to figure out the issue with my Service logon, and it’s working now.

I see this issue frequently and typically resolve it by rebooting the target server. . . highly annoying!!

Hi @Rphilippi,

This discussion is over 2 years old. Octopus has changed a lot since then and we haven’t had any recent reports.
What version of Octopus are you running? Could you attach the logs where the error is happening?
Did you try to run the command we asked the other user to run?