Joshua Enfield
Joshua Enfield

Reputation: 18298

Setting folder permissions for App Identity from VSTS?

We are using VSTS deployment groups and the Web deploys from VSTS, and allow VSTS to create and manage the site. One issue we are running into is that the application needs some folder permissions set. Is there a way to have these permissions set via VSTS?

Succinctly: Is there a way to have VSTS set folder permissions for the default app pool identity?

Upvotes: 2

Views: 1210

Answers (1)

starian chen-MSFT
starian chen-MSFT

Reputation: 33708

You need to make sure the deployment agent account (windows service account if the agent is running as service) has the enough permission to grant the necessary permission for a user.

Then you can manage permission from the command line through task (e.g. Command Line, PowerShell)

Some article about manage permission programming:

PowerShell – Editing permissions on a file or folder

New-Item -type directory -path C:\MyFolder
$Acl = Get-Acl "C:\MyFolder"
$Ar = New-Object  system.security.accesscontrol.filesystemaccessrule("username","FullControl","Allow")
$Acl.SetAccessRule($Ar)
Set-Acl "C:\MyFolder" $Acl

Managing Permissions from the Command Line

icacls C:\Shared\Finance\Metrics /grant:r "Finance Users":(OI)(CI)M /grant:r "Metrics Users":(OI)(CI)M

Upvotes: 5

Related Questions