System.UnauthorizedAccessException: (5) Access is denied: [The target file is a directory, not a file: [\\?

I am using latest version of Octopus server(Octopus.3.17.4-x64) and latest version of Tentacle(Octopus.Tentacle.3.16.0-x64).

While deploying am getting below error…

System.UnauthorizedAccessException: (5) Access is denied: [The target file is a directory, not a file: [\?
at Alphaleonis.Win32.NativeError.ThrowException(UInt32 errorCode, String readPath, String writePath)
October 5th 2017 18:05:28Error
at Alphaleonis.Win32.Filesystem.File.CopyMoveCore(Boolean isFolder, KernelTransaction transaction, String sourceFileName, String destinationFileName, Boolean preserveDates, Nullable1 copyOptions, Nullable1 moveOptions, CopyMoveProgressRoutine progressHandler, Object userProgressData, CopyMoveResult copyMoveResult, PathFormat pathFormat)
October 5th 2017 18:05:28Error
at Alphaleonis.Win32.Filesystem.File.Copy(String sourceFileName, String destinationFileName, Boolean overwrite)
October 5th 2017 18:05:28Error
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.RetryTrackerFileAction(Action fileAction, String target, String action)
October 5th 2017 18:05:28Error
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.CopyDirectory(String sourceDirectory, String targetDirectory, CancellationToken cancel)
October 5th 2017 18:05:28Error
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.CopyDirectory(String sourceDirectory, String targetDirectory, CancellationToken cancel)
October 5th 2017 18:05:28Error
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.CopyDirectory(String sourceDirectory, String targetDirectory)
October 5th 2017 18:05:28Error
at Calamari.Deployment.Conventions.CopyPackageToCustomInstallationDirectoryConvention.Install(RunningDeployment deployment)
October 5th 2017 18:05:28Error
at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
October 5th 2017 18:05:28Error
at Calamari.Deployment.ConventionProcessor.RunConventions()
October 5th 2017 18:05:28Error
Running rollback conventions…

Kindly help me to resolve.

Thanks…

Hi,

Thanks for reaching out.

I can see that the issue is to do with deployment to a custom installation directory, but we’ll need to dig a little deeper to find out exactly what’s going on.

Can you please share the full log for the failed deployment and a screenshot of the step (the step setup, not it running) that’s failing.

Michael