Umbraco directory permissions | umbPermissions Script
Posted
by
Vizioz Limited
on Vizioz Umbraco Blog
See other posts from Vizioz Umbraco Blog
or by Vizioz Limited
Published on 2009-05-29T05:20:00.000-07:00
Indexed on
2010/12/06
17:00 UTC
Read the original article
Hit count: 774
Umbraco CMS
|umbraco scripts
I just downloaded a backup of one of my clients Umbraco sites and I was setting up a copy locally and of course I had to set the directory permissions, so I thought there must be a better way!
I did a bit of Googling and had a look on the Umbraco forum but I could not find a script to perform this task, then I came across Set ACL on Source Forge and I set about writing my own little script.
Save the following script as umbpermissions.bat and save it in the same directory as Set ACL
echo off
REM Script to setup the Security Permissions for an Umbraco site
REM This script will give your machine Network Service full rights to the appropriate directories
REM **** Pre-requisites ****
REM You will need to download -> http://setacl.sourceforge.net/
REM **** Usage ****
REM You need to pass in the path for the root of your Umbraco directory
REM E.g. umbPermissions.bat C:\inetpub\umbracoroot
@echo umbPermissions.bat - Script to set Umbraco File and Directory Permissions
@echo Published by Chris Houston - 29th May 2009
@echo http://blog.vizioz.com
SetACL.exe -on "%1\web.config" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\bin" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\config" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\css" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\data" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\masterpages" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\scripts" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\umbraco" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\umbraco_client" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\usercontrols" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
SetACL.exe -on "%1\xslt" -ot file -actn ace -ace "n:%computername%\NETWORK SERVICE;p:full"
Feel free to comment if I missed anything!
© Vizioz Umbraco Blog or respective owner