Friday, 29 May 2009

Umbraco directory permissions | umbPermissions Script

It has bugged me since I first used Umbraco that if I was doing a manual installation I had to set the directory permissions

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!

Wednesday, 27 May 2009

Vizioz is back on the web

I founded Vizioz in 1996 as a website development business. Since then Vizioz has come in and out of focus, it is time to start building Vizioz into a website development consultancy. Over the following two months we will be launching our new website where we will be promoting our ASP.NET, C#, XHTML, CSS, XSLT, SQL, Umbraco Development, Wordpress Development and Graphic Design services, and of course our website will be powered by the open source content management system called Umbraco CMS which we have used for 10+ client sites in the last twelve months.

I will be using this new blog to talk about client projects we are currently working on and any Umbraco development related bits of code that we feel would be good to release back to the Umbraco community.

Top 5 most popular posts