When setting up or moving a Sitecore solution, you have to remember to setup the correct folder permissions and IIS permissions.
It something like sections 3.3.3.2 - 3.3.3.9 here:
http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%205,-d-,3/Installation/EXE%20Installation.aspx
The folder permissions are usually setup when using the installer, but not when using the Zip or just moving an existing solution.
You could use the guides (for Sitecore 6) here: http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/Installation.aspx
But going through steps 3.5 to 3.6.5 is bothersome.
Anyone made any scripts or programs that could do this more or less automatically?
It will be greatly appreciated.
Assuming you are playing around with a non-production instance:
in non-production environments, it‘s generally easiest to grant the ASP.NET account and the anonymous Internet user account Full Control of the Website and Data folders as well as all their descendants and grant the NETWORK SERVICE user full control of D:\Sitecore\Databases folder.
So (The permissions are set recursively):
ASP.NET account (IUSR in IIS 7) & Anonymous user: FULL CONTROL OVER:
NETWORK SERVICE (default SQL Server account): FULL CONTROL OVER:
Alternatively you could Cacls to set permissions to a file/folder from the commandline.
For example you could use the following statement to grant the Administrator
user Write
AND Delete
permissions on c:\file
icacls c:\file /grant Administrator:(D,WDAC)
I am using this script
Option Explicit
Dim fso, path
' get current directory
set fso = createobject("Scripting.FileSystemObject")
path = fso.GetFolder(".").Path
WScript.StdErr.WriteLine "Setting up rights"
WScript.StdOut.WriteLine "Path:" & path
Dim appname
appname = InputBox("Name of the App Pool", , "AppPool")
If appname = "" Then
Wscript.Quit
End If
Dim wsShell
Set wsShell = WScript.CreateObject ("WSCript.Shell")
'wsShell.run "icacls """+ path + """ /inheritance:r"
wsShell.run "icacls """+ path + """ /inheritance:e /grant ""IIS AppPool\" + appname + """:(RX)"
wsShell.run "icacls """+ path + "\App_Data"" /inheritance:e /grant ""IIS AppPool\" + appname + """:(F)"
wsShell.run "icacls """+ path + "\sitecore\shell"" /inheritance:e /grant ""IIS AppPool\" + appname + """:(F)"
wsShell.run "icacls """+ path + "\temp"" /inheritance:e /grant ""IIS AppPool\" + appname + """:(F)"
wsShell.run "icacls """+ path + "\upload"" /inheritance:e /grant ""IIS AppPool\" + appname + """:(F)"
set wsShell = Nothing