2

在设置或移动 Sitecore 解决方案时,您必须记住设置正确的文件夹权限和 IIS 权限。

它类似于此处的第 3.3.3.2 - 3.3.3.9 节:http: //sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%205,-d-,3/Installation/EXE%20Installation.aspx

文件夹权限通常在使用安装程序时设置,但在使用 Zip 或仅移动现有解决方案时不会设置。

您可以在此处使用指南(适用于 Sitecore 6):http: //sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/Installation.aspx

但是执行步骤 3.5 到 3.6.5 很麻烦。

任何人都制作了可以或多或少自动执行此操作的任何脚本或程序?

将不胜感激。

4

2 回答 2

1

假设您正在使用非生产实例:

在非生产环境中,授予 ASP.NET 帐户和匿名 Internet 用户帐户对网站和数据文件夹及其所有后代的完全控制权并授予 NETWORK SERVICE 用户对 D:\Sitecore\ 的完全控制权通常是最简单的数据库文件夹。

所以(权限是递归设置的):

ASP.NET 帐户(IIS 7 中的 IUSR)和匿名用户:完全控制:

  • /Website
  • /Data

网络服务(默认 SQL Server 帐户):完全控制:

  • /Databases

或者,您可以Cacls 从命令行设置文件/文件夹的权限。

例如,您可以使用以下语句授予Administrator用户WriteANDDelete权限c:\file

icacls c:\file /grant Administrator:(D,WDAC)
于 2011-03-01T16:02:22.377 回答
-1

我正在使用这个脚本

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
于 2012-10-09T13:32:54.523 回答