Configuring Web Deploy IIS User premissions
Asked Answered
A

2

7

I successfully configured IIS for Web Deploy and added a IIS Manager User. The problem is when i try to publish, i get back error

Error 1 Web deployment task failed. (Unable to perform the operation ("Delete Directory") for the specified directory ("2_0_50727"). This can occur if the server administrator has not authorized this operation for the user credentials you are using. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER.) C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets 4270 5 WebAPI

Which shortly means, there are no premissions for user to handle root folder content. I couldn't figure out, who is the user, to give the permissions to.

The linked Microsoft page is telling, in most of the case, it's "Local Service", well it already has full control permissions. So i tried more "IUSR", "DefaultAppPool" - still not right ones. The temporary solution is to give permissions to "Everyone" and then it works... but who's the right user??

Antiproton answered 22/5, 2015 at 15:39 Comment(2)
Have you looked at this? blogs.iis.net/krolson/… There's a section with the title "How to find out what account to add for IIS user ACLs"Tanker
Did you build out IIS with the proper structure yet? Never use the defaultapppool, as that is a poor practice. You need a new site in IIS, a folder for the site to be published too, and a new IIS pool for the site to be hosted in.Gnotobiotics
D
7

Right click the web site in IIS Manager and choose Deploy -> Configure Web Deploy Publishing. Choose your IIS-user and Setup, in order to give correct rights for publishing to that site.

Diwan answered 12/2, 2020 at 15:9 Comment(1)
This fixed it for me.Tosspot
A
3

Did you add a rule (contentPath, createApp, dirPath, filePath, iisApp, runCommand) for your IIS Manager user in Manager Service Delegation?

And also I granted access to the site folder for LOCAL SERVICE because Web Management Service runs under this account and for NETWORK SERVICE because of Web Deployment Agent Service.

Adipose answered 21/6, 2017 at 20:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.