Web 部署和文件夹权限

发布于 2024-09-17 06:46:21 字数 212 浏览 2 评论 0原文

我正在使用 VS 2010 构建 Web 应用程序的部署包。我使用它生成的部署命令脚本将其手动部署到 IIS 6.0 服务器。所有内容都会正确复制到 Inetpub 默认网站下。我遇到的唯一问题是部署后文件夹权限不断重置。

假设我的网站位于“Mywebsite”文件夹下。我授予某些用户 XYS 对此文件夹的完全控制权。一切都很好。下次部署时,用户 XYZ 不再具有完全控制权,并且权限会重置。

I'm using VS 2010 to build the deployment package for a web application. I manually deploy it to the IIS 6.0 server using the deployment ccommand script it generates. All the stuff gets copied under the Inetpub default website properly. The only issue I have is that the folder permissions keep getting reset once I deploy.

Say my website is under the folder "Mywebsite". I grant certain user XYS full control to this folder. All is well. The next time I deploy, user XYZ no longer has full control and the permissions gets reset.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

本宫微胖 2024-09-24 06:46:21

如果您想跳过 ACL 操作,那么您需要在构建中设置一个属性。您可以通过两种方式执行此操作

  1. 编辑项目文件
  2. 创建 .wpp.targets 文件

我建议#2。对于这种情况,在项目文件所在的同一目录中创建一个名为 {ProjectName}.wpp.targets 的新文件,其中 {ProjectName} 是项目的名称。然后,您应该在此文件中放置以下内容。

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
         ToolsVersion="4.0">

  <PropertyGroup>
    <IncludeSetAclProviderOnDestination>False</IncludeSetAclProviderOnDestination>
  </PropertyGroup>
</Project>

您在此处设置属性 IncludeSetAclProviderOnDestination,该属性将向 Web 发布管道发出信号,使其不在为包/发布创建的清单中包含 ACL 提供程序。

如果你想采用方法#1,只需将整个元素放入元素下即可。

If you want to skip ACL operations then you need to set a property in your build. You can do this in two ways

  1. Edit your project file
  2. Create a .wpp.targets file

I would recommend #2. For this case create a new file in the same directory as your project file with the name {ProjectName}.wpp.targets where {ProjectName} is the name of your project. Then inside of this file you should place the following contents.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
         ToolsVersion="4.0">

  <PropertyGroup>
    <IncludeSetAclProviderOnDestination>False</IncludeSetAclProviderOnDestination>
  </PropertyGroup>
</Project>

Here you are setting the property IncludeSetAclProviderOnDestination which will signal the Web Publishing Pipeline to not include ACL providers in the manifest that is created for the package/publish.

If you want to take approach #1 just throw in the entire under the elment.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文