1

Have a build script in psake/powershell that compiles and deploys a website to remote server using msdeploy. I need to set the acl's on one file in the root after the deployment. Anyone done this? I know I can use msdeploy but can't get the syntax right. Is there are better way? I simply need to grant modify permissions on the file to the app pool for the site.

Cheers,

Samuel Goldenbaum
  • 18,391
  • 17
  • 66
  • 104
  • This may be useful for you: http://blogs.msdn.com/b/johan/archive/2008/10/01/powershell-editing-permissions-on-a-file-or-folder.aspx – TShark Jul 08 '12 at 20:15

1 Answers1

0
$SERVER_APPROOT = "W:\webroot\site1\"
$deployServer = "WEB01"

$webDeployArgs = '-verb:sync -source:setacl -dest:setacl="' + $SERVER_APPROOT  + 'mypath\subpath\subsubpath\",computerName=' + $deployServer + ',setaclaccess=Modify'
Start-Process "$Env:SystemDrive\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -ArgumentList $webDeployArgs -NoNewWindow -Wait
Joe Niland
  • 885
  • 1
  • 14
  • 31