Archive for tag: Folder Permissions

Set Umbraco Folder Permissions from command line


Today, I have faced new issue with folder permission in Umbraco, recently we have set-up new Windows 2008 Server with IIS 7 and there was issue with Folder permission, then I have searched on it and found out from Umbraco Wiki following article.

Execute following code from Command Line inside the root directory of installation (Note: Make sure you run command line with administrator permissions)

REM icacls . /grant "NETWORK SERVICE":(OI)(CI)M
icacls app_code /grant "NETWORK SERVICE":(OI)(CI)RX
icacls app_browsers /grant "NETWORK SERVICE":(OI)(CI)RX
icacls app_data /grant "NETWORK SERVICE":(OI)(CI)M
icacls bin /grant "NETWORK SERVICE":(OI)(CI)R
icacls config /grant "NETWORK SERVICE":(OI)(CI)M
icacls css /grant "NETWORK SERVICE":(OI)(CI)M
icacls data /grant "NETWORK SERVICE":(OI)(CI)M
icacls macroScripts /grant "NETWORK SERVICE":(OI)(CI)M
icacls masterpages /grant "NETWORK SERVICE":(OI)(CI)M
icacls media /grant "NETWORK SERVICE":(OI)(CI)M
icacls python /grant "NETWORK SERVICE":(OI)(CI)M
icacls scripts /grant "NETWORK SERVICE":(OI)(CI)M
icacls umbraco /grant "NETWORK SERVICE":(OI)(CI)M
icacls usercontrols /grant "NETWORK SERVICE":(OI)(CI)R
icacls xslt /grant "NETWORK SERVICE":(OI)(CI)M
icacls web.config /grant "NETWORK SERVICE":(OI)(CI)M
icacls web.config /grant "NETWORK SERVICE":M


Note: If you are using Windows 2008 Server/IIS 7.0 or newer then will need to add IIS_USRS or Application_Pool_Name as below

REM icacls . /grant "IIS_IUSRS":(OI)(CI)M
icacls app_code /grant "IIS_IUSRS":(OI)(CI)RX
icacls app_browsers /grant "IIS_IUSRS":(OI)(CI)RX
icacls app_data /grant "IIS_IUSRS":(OI)(CI)M
icacls bin /grant "IIS_IUSRS":(OI)(CI)R
icacls config /grant "IIS_IUSRS":(OI)(CI)M
icacls css /grant "IIS_IUSRS":(OI)(CI)M
icacls data /grant "IIS_IUSRS":(OI)(CI)M
icacls macroScripts /grant "IIS_IUSRS":(OI)(CI)M
icacls masterpages /grant "IIS_IUSRS":(OI)(CI)M
icacls media /grant "IIS_IUSRS":(OI)(CI)M
icacls python /grant "IIS_IUSRS":(OI)(CI)M
icacls scripts /grant "IIS_IUSRS":(OI)(CI)M
icacls umbraco /grant "IIS_IUSRS":(OI)(CI)M
icacls usercontrols /grant "IIS_IUSRS":(OI)(CI)R
icacls xslt /grant "IIS_IUSRS":(OI)(CI)M
icacls web.config /grant "IIS_IUSRS":(OI)(CI)M
icacls web.config /grant "IIS_IUSRS":M


Note: python directory permission would only be for earlier version of Umbraco, I mean before Umbraco 4.7 and miceroScript directory permissions would be for Umbraco 4.7 or newer version.
If you like this post please don't forget to share with your friends via Facebook, Twitter,  LinkedIn, Google+, etc

Thank you,
Have good Day