Re: wshShell.Run - permission denied
From: Will Chung (chungw74_at_hotmail.com)
Date: 09/13/04
- Next message: Charles E Finkenbiner: "Re: add user to AD group"
- Previous message: Torgeir Bakken \(MVP\): "Re: unc file spec ?????"
- Next in thread: name: "Re: wshShell.Run - permission denied"
- Reply: name: "Re: wshShell.Run - permission denied"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 13 Sep 2004 01:21:14 -0700
I recommend that you check the permissions on cscript.exe and
cmd.exe to ensure that the IUSR_CPUNAME and IWAM_CPUNAME accounts have
read and execute permissions.
Another thing to try is running a different program like:
<%
dim WshShell, retCode
Set WshShell = Server.CreateObject("WScript.Shell")
retCode=WshShell.Run ("cmd /c echo hi > c:\temp\test.txt" , 0, TRUE)
response.write "Return Code: " & retCode
%>
If you are using cscript to run the vbs code then the IUSR_ account
should have at least read and execute permissions to the CSCRIPT.exe
program. In the above example, I'm using cmd.exe to echo information
into a text file in the c:\temp\ directory. In the above example,
you'll need to allow the IUSR read and execute on cmd.exe and write
permissions to the C:\temp directory.
If an IIS lockdown script was run on your server, then many files and
folders may have explicit deny permissions to the IUSR and IWAM
accounts. This is to help secure the server from cyber attacks.
Note that by giving permissions to execute certain programs like
cmd.exe and cscript.exe to the IUSR account, you are in effect allowing
anonymous users to execute programs on your server via the ASP scripts.
You must therefore maintain control of write permissions to your
wwwroot directory to prevent unauthorized users/hackers from uploading
unauthorized ASP scripts onto the server and running whatever they want
on it.
Hope this helps.
-Will
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Charles E Finkenbiner: "Re: add user to AD group"
- Previous message: Torgeir Bakken \(MVP\): "Re: unc file spec ?????"
- Next in thread: name: "Re: wshShell.Run - permission denied"
- Reply: name: "Re: wshShell.Run - permission denied"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|