Authorization manager check failed while setting the octopus variable

Hi team,

i’m setting an octopus variable in downloading a package step in post deployment script,

Set-OctopusVariable -name “auditpath” -value “#{DB.Deployment.Package}”
where the package is extracted to custom installation directory which is a shared path. i’m getting this below error which says AuthorizationManager check failed.

. : AuthorizationManager check failed.

10:03:51   Error    |       + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecordException
10:03:51   Error    |       + FullyQualifiedErrorId : UnauthorizedAccess
10:03:52   Verbose  |       Calamari.Commands.Support.CommandException: PostDeploy script returned non-zero exit code: 1
10:03:52   Verbose  |       at Calamari.Deployment.Conventions.ConfiguredScriptConvention.Install(RunningDeployment deployment)
10:03:52   Error    |       Running rollback conventions...
10:03:52   Verbose  |       at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
10:03:52   Verbose  |       at Calamari.Deployment.ConventionProcessor.RunConventions()


Thanks in Advance.

Hi @chandramouli429,

Thanks for getting in touch!

We have run into these kinds of problems when running post-deploy scripts within a file share location.
One recent solution was to add the file share path to the list of trusted sites as detailed here: Deploying to fileshare - authorisation failure

A possibly easier option may be to move the script you’re running to the pre-deploy section. These scripts run from the initial extraction folder and typically don’t hit these AuthorizationManager section. It looks like you’re using an Octopus variable so the value for that should already exist at that point in the deployment.

Lastly, assuming that #{DB.Deployment.Package} is a variable defined within Octopus, I’m curious why you’re placing this within an output variable? If this is to use in a later step, would it not be possible to call the #{DB.Deployment.Package} variable directly?

Regards,
Paul

HI @paul

thanks for the response, i will try to move it to pre-deployment script.
i cannot use this #{DB.Deployment.Package} variable directly as this is being constructed with other variables which are scoped to initial deployment step.

Regards,
Mouli

1 Like

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