(又一个)通过命令行映射驱动器的问题

发布于 2024-09-03 09:53:24 字数 655 浏览 14 评论 0原文

我知道,我知道。到处都有一百万个线程在讨论映射驱动器的问题。我已经准备好了其中的许多内容,但我似乎仍然无法解决这个问题或找到解决方案。

我有一个构建服务器/持续集成服务器(运行 CruiseControl.NET 的 Win 2003),用于监听我们的源代码控制服务器。当检测到更改时,构建服务器会获取新代码,对其进行编译、测试,如果成功,则将文件复制到我们的一台 Web 服务器。有 6 个 Web 服务器 - 3 个 Windows 2003 盒子,3 个 LAMP 盒子。每个操作系统都有一个单独的开发、暂存和生产环境。所有 6 个 Web 服务器都映射到构建服务器上的不同驱动器。我有一个 Windows 启动脚本,它调用一些“NET USE”命令,为部署做好准备。

CCNET是监听SVN的服务。然而,CCNET 调用 NAnt 来执行所有实际处理和任务(编译、测试、复制)。

当我手动映射驱动器并手动运行 NAnt 脚本时,一切都运行良好。当启动脚本映射驱动器并且 CCNET 触发 NAnt 时,将无法找到驱动器。我认为这个问题与用户帐户有关。 CCNET 在本地系统帐户下运行。我不知道启动脚本在什么帐户下运行。显然手动执行是在我的帐户下运行的。

最奇怪的是,在过去的某些时候,一切都运转良好。我不确定发生了什么变化。如何使映射的驱动器对所有用户和服务可见? (此外,欢迎对此设置/过程的任何部分提出任何其他批评)

I know, I know. There are a million threads everywhere talking about problems with mapped drives. I've ready many of them but I still can's seem to wrap my head around this problem or come to a solution.

I have a build server/continuous integration server (Win 2003 running CruiseControl.NET) that listens to our source control server. When a change is detected, the build server gets the new code, compiles it, tests it and if successful, copies the files to one of our web servers. There are 6 web servers - 3 Windows 2003 boxes, 3 LAMP boxes. Each OS has a separate development, staging and production box. All 6 web servers are mapped to a different drive on the build server. I have a Windows start-up script that calls a few "NET USE" commands that set the stage for the deployments.

CCNET is the service that listens to SVN. However, CCNET calls NAnt to perform all of the actual processing and tasks (compilation, testing, copying).

When I map the drives manually and run the NAnt scripts manually, everything works beautifully. When the startup script maps the drives and CCNET triggers the NAnt, the drives are nowhere to be found. I think the problem has something to do with user accounts. CCNET runs under the LOCAL SYSTEM account. I don't know what account the startup script runs under. Obviously manual execution runs under my account.

The weirdest part is that at certain points in the past, everything was working great. I am not sure what changed. How can I get the mapped drives to be visible to all users and services? (Also, any other critique of any part of this setup/process is welcome)

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

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

发布评论

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

评论(1

2024-09-10 09:53:24

问题肯定出在用户帐户上。驱动器映射到与运行 CCNET 的帐户不同的帐户下。当我最终理清一切并让它在本地系统帐户上运行时,一切都工作正常。

The problem definitely was with user accounts. The drives were mapped under different accounts than the account CCNET was running on. Once I finally straightened everything out and got it running on the LOCAL SYSTEM account everything worked fine.

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