Deploying to fileshare - authorisation failure

Hi, I’m trying to deploy a Windows app to a fileshare with the “Deploy a Package” template and I’m having a problem with both a deploy and post-deploy script.
The files are all copied to the share OK, but when it comes to the deployment scripts, I get:
Writing script module ‘Delete and Copy Config’ as PowerShell module Library_DeleteandCopyConfig_637364543636839573.psm1. This module will be automatically imported - functions will automatically be in scope.

. : AuthorizationManager check failed.

At line:1 char:32

  • Set-PSDebug -Trace 0;Try {. {. '\abcgroup.local\CompanyFiles\A Big Company …

  • 
      + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecordException 
      + FullyQualifiedErrorId : UnauthorizedAccess 
    
    

PostDeploy script returned non-zero exit code: 1
Running rollback conventions…
Adding journal entry:



Access to the path is denied.
System.UnauthorizedAccessException
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalReplace(String sourceFileName, String destinationFileName, String destinationBackupFileName, Boolean ignoreMetadataErrors)
at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.OverwriteAndDelete(String originalFile, String temporaryReplacement)
at Calamari.Deployment.Journal.DeploymentJournal.AddJournalEntry(JournalEntry entry)
at Calamari.Commands.DeployPackageCommand.Execute(String[] commandLineArguments)
at Calamari.Program.Run(CommonOptions options)
at Calamari.Program.Main(String[] args)
Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20200923093921-9174-8 exited with code 100
Updating manifest with output variables
Updating manifest with action evaluated variables
The remote script failed with exit code 100

I’ve followed the links:


I have removed the FQDN so it’s now a Shortname
We have turned off IE enhanced mode for all users

I moved the script from post-deployment to “Deployment” (it’s copying a couple of files) and that made no difference either

Do you have any suggestions where we can look for the problem?
Thanks
Richard

Hey Richard,

Thanks for reaching out. I’m going to reach out to some colleagues and get some more information on this.

Please feel free to reach out in the meantime.

Thanks,
Jeremy

Hey Richard,

I did run into the same issue when I was mirroring your setup, however I was able to get it running by adding the UNC path to trusted sites within Internet Settings on the tentacle.

The issue is Deploy and Post-Deploy scripts are attempting to run off the remote UNC path, which windows doesn’t trust.

This worked for me (\192.168.139.160\users\public\test\ was my deploy path):


Would you please be able to give that a shot and let me know if it works for you?

Thanks,
Jeremy

Thank you for continuing to look at this. I will try it over the weekend or on Monday
Richard

You’re very welcome. Please let me know if it works or if we need to try something else.

I hope you have a great weekend.

Thanks,
Jeremy

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