Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission denied when running a shell script from within vbscript

Status
Not open for further replies.

mluken

Programmer
Dec 31, 2003
54
US
I am trying to execute a *.bat file from within an ASP page. My vbscript looks like this:

Code:
<% 
Dim oShell 
Set oShell = Server.CreateObject("WSCript.shell") 
oShell.run "c:\inetpub\jakarta\bin\stopTomcatService.bat" 
Set oShell = Nothing 
%>

This used to work, but I just upgraded servers and now for some reason I am getting a "Permission denied" error. I have added the Internet Guest account to the file permissions for stopTomcatServices.bat and given it full access. The same is true for the asp file that this code is located in. I am stumped here.... What else could I be missing?

Thanks!
 
Hello mluken,

A couple of things you may consider checking progressively.
[1] If the iis is running under Norton anit-virus script protection(?), maybe, you have to turn that bit of protection off, see what happen.
[2] If not sorted out, then check whether the anonymous account IUSR_<computername> is having sufficient right to launch script. If not, you may consider giving it a higher privilege.
[3] Under the iis(?), check the home directory's application protection. How about lowering its level?

regards - tsuji
 
Funny I am having similar problems with running the following code. However the only difference is I’m trying to use cmd.exe to execute a txt file in order to ftp some files. Here is my code:

Set objShell = Server.CreateObject("WScript.Shell")
objShell.Run("ftp.exe -s:F:\Inetpub\GRIPANET\uploadtxtfile\ftpsend.txt")
Set objShell = Nothing

the error is occurring on at - objShell.Run("ftp.exe .... Line
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top