5

The following command:

icacls c:\inetpub\wwwroot\ /grant "IIS AppPool\DefaultAppPool":F

Constantly returns

Invalid parameter "IIS AppPool\DefaultAppPool"

For any app pool name on any folder, I'm running this from powershell as admin.

I'm sure this has worked before?

Any suggestions much appreciated!

Dan

DannyT
  • 225
  • 3
  • 7
  • I am having the same issue, it doesn't seem to matter what apppool i enter. I even tried importing the WebAdministration snapin just to see if it was path related to IIS: Please let me know if you find anything –  Jun 06 '12 at 19:32
  • Invalid syntax likely due to "bug" in documented example ("Securing Resources" section): https://www.iis.net/learn/manage/configuring-security/application-pool-identities – Matt Borja Nov 02 '16 at 16:42

1 Answers1

7

You need to wrap the whole of the grant argument in quotes:

icacls c:\inetpub\wwwroot\ /grant "IIS AppPool\DefaultAppPool:F"
Castrohenge
  • 390
  • 1
  • 6
  • 12
  • I don't actually recall what site/server we were having this issue with but this sounds like this would have very likely been the answer and I'll know what to check next time :) – DannyT Aug 09 '12 at 14:08
  • Relevant to https://msdn.microsoft.com/en-us/library/hh398365(v=vs.110).aspx#BKMK_Install_the_IntelliTrace_Stand_Alone_Collector -- thank you – lance Feb 04 '15 at 20:12
  • 1
    For powershell i ended up with `& icacls $AppDataPath /t /grant "IIS AppPool\DefaultAppPool:(OI)(CI)F"` wanting it to propagate full access to child folders too – Chris Marisic Sep 13 '17 at 15:29