Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running a build process in powershell and using msdeploy to deploy a website to a remote server. I need to set acls on a particular file either when the site is deployed or post deployment.

What is the best way to do this?

share|improve this question

1 Answer 1

You can use the setAcl provider. You'll need to swap to use a manifest provider for the source:

<customManifest>
    <!-- or whatever your web app source is -->
    <iisApp path="Default Web Site" />

    <setAcl path="Default Web Site\web.config" 
            setAclUser="ApplicationPoolIdentity"
            setAclAccess="Write" 
            setAclResourceType="File" />
</customManifest>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.