从 IIS6 运行 bash 脚本
在 Windows 2003 上运行 IIS6。我正在尝试设置一个运行 bash 脚本的简单 ASP 页面:
dim wshShell
set wshShell = CreateObject("WScript.Shell")
dim command
command = "c:\inetpub\wwwroot\bin\bash.exe /cygdrive/c/inetpub/wwwroot/test.sh"
wshShell.Run(command)
set wshShell = nothing
我已将 IIS6 配置为使用帐户 IUSR_SERVERNAME 作为默认应用程序池的标识,并确认当我 如果我将命令
runas /usr:IUSR_SERVERNAME [command]
设置为 notepad.exe,则 IIS6 会启动它(当然没有窗口,但我可以在任务管理器中看到它,并且用户名设置为 IUSR_SERVERNAME)。
有什么我忽略的东西需要配置吗?我在 Windows 7 / IIS7 上运行了一个类似的脚本,运行起来并不困难。
Running IIS6 on Windows 2003. I'm trying to set up a simple ASP page which runs a bash script:
dim wshShell
set wshShell = CreateObject("WScript.Shell")
dim command
command = "c:\inetpub\wwwroot\bin\bash.exe /cygdrive/c/inetpub/wwwroot/test.sh"
wshShell.Run(command)
set wshShell = nothing
I've configured IIS6 to use the account IUSR_SERVERNAME as the identity for the default application pool, and confirmed that the script executes when I run it from the command line using
runas /usr:IUSR_SERVERNAME [command]
If I set the command to be notepad.exe, IIS6 launches it (with no window, of course, but I can see it in Task Manager, and the user name is set to IUSR_SERVERNAME).
Is there something I'm overlooking that I need to configure? I've got a similar script running on Windows 7 / IIS7, and it wasn't difficult to get running.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
已解决:切换到轻量级 Mongoose Web 服务器(使用 Tcl CGI 脚本而不是 ASP)。就我们的目的而言——运行一个简单的演示——这工作得很好,而且启动和运行它的痛苦要小得多。
Resolved: switched to the lightweight Mongoose web server (using a Tcl CGI script instead of ASP). For our purposes -- running a simple demo -- this works fine, and it was much less painful to get it up and running.