Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure DevOps Manage IIS task deploy fails due to insufficent permissions yet account is in local admin group

After a successful build using a hosted VS2017 agent, I'm trying to deploy on-prem using an local hosted agent which was setup using a domain account which should have sufficient permissions as it is in the local admin group. As I was digging around on this issue elsewhere, one user re-installed their agent using NTATHORITY\SYSTEM and it worked.

I d'ont really need to create or stop\start the website, just deploy the recent build artifact.
What permissions should I check or should I use another task?

enter image description here

019-04-06T21:03:10.3898646Z ERROR ( message:Configuration error 2019-04-06T21:03:10.3899503Z

2019-04-06T21:03:10.3899791Z Filename: redirection.config 2019-04-06T21:03:10.3900026Z 2019-04-06T21:03:10.3900293Z Line Number: 0 2019-04-06T21:03:10.3900530Z 2019-04-06T21:03:10.3900852Z Description: Cannot read configuration file due to insufficient permissions 2019-04-06T21:03:10.3901076Z 2019-04-06T21:03:10.3901333Z . ) 2019-04-06T21:03:10.8135484Z ##[error]Process 'appcmd.exe' exited with code '5'.

like image 559
bitshift Avatar asked Apr 06 '19 21:04

bitshift


People also ask

How do I check permissions on Azure DevOps?

View organization or collection-level permissions Open admin settings for the organization or a project collection. Choose the Azure DevOps logo to open Projects. Then choose Organization settings. Choose Permissions, the Project Collection Administrators group, and then Members.

Which permission do the approvers need on the pipeline?

Manage release approvers Can add or edit approvers for stage(s) in release pipeline(s). This permissions also controls whether a user can edit the approvers inside the stage of a specific release instance.

How do I disable classic pipeline in Azure DevOps?

In my case, the pipeline is called Build, and I will click on the pipeline's options and click on Settings on the right corner, as shown in the screenshot below. I will set the “Processing of new run requests” from the options page to disabled.


1 Answers

When we install Azure agent as a service(In Windows, search for 'Services' and look for something like Azure Pipelines Agent..), by default it is logged on as 'Network Service'. Change it to 'Local System' and the pipeline should be able to run IIS related tasks/commands.

like image 76
Shruthi Rajaram Avatar answered Sep 22 '22 03:09

Shruthi Rajaram