IIS Server Security >> WshShell Access

by Andrew » Tue, 27 Jul 2004 13:31:14 GMT

What permisions do I need to enable to allow the IUSR_ to
execute a command line program in IIS 6?
Eg, "cmd /c dir"
This works when logged onto web site as administrator but
not anonymously?

--Andrew


IIS Server Security >> WshShell Access

by Bernard » Tue, 27 Jul 2004 17:24:13 GMT


It's bad idea to do this.
anyway, have you try grant iusr / iis_wpg read and execute permissions ?

--
Regards,
Bernard Cheah
http://www.tryiis.com/
http://support.microsoft.com/
http://www.msmvps.com/bernard/










IIS Server Security >> WshShell Access

by Paul Lynch » Tue, 27 Jul 2004 19:09:21 GMT

On Mon, 26 Jul 2004 22:31:14 -0700, "Andrew"



Andrew,

By default the IUSR account in IIS6 does not have access to files in
the %windir%\System32 folder.

PRB: IIS 6.0: CGI Code That Calls External Applications May Fail
http://support.microsoft.com/?id=311481


Regards,

Paul Lynch
MCSE


WshShell Access

by anonymous » Wed, 28 Jul 2004 08:45:29 GMT



to
but
to files in
May Fail

Thanks for the link, turns out that when I set the
permissions they were not always inherited from the top
level dir! I suppose I should have told it to replace
permissions on all files and subfolders etc! It's working
now.

-Andrew


WshShell Access

by anonymous » Wed, 28 Jul 2004 08:47:19 GMT

I know, I always like to avoid it, but my client insists
on using it!
It turns out while I had the correct permissions, they
weren't being inherited from top level dirs. Thanks for
the info!

-- Andrew

execute permissions ?
message

to
but


Similar Threads

1. "Access is Denied" error when calling wshShell from ASP

I've got a script in an ASP page that is supposed to extract certain
files from a zip file, move them, create a new zip with the moved
files and then make a self-extracting archive out of the new zip file.
I'm doing this using wshShell.Exec, the WinZip command line tool and
zip2exe.exe from the pkware suite (because WinZip's command line
doesn't support creating self-extracting archives and for historical
compatibility reasons). This is running on Windows 2000 Server and IIS
5.0 both fully patched as of yesterday. The relevant code is below:

set objFSO = CreateObject("Scripting.FileSystemObject")

intProject = 12345
strZipFile = "F:\path\" & intProject & ".zip"

If objFSO.FileExists (strZipFile) Then

  ' extracts .doc and .txt files from zip file - works fine
  Set objShell = CreateObject("WScript.Shell") 
  Set objCmd = objShell.Exec("c:\Program Files\Winzip\wzunzip.exe -O-
" & strZipFile & " *.doc *.txt f:\working\doc\")
  set objCmd = Nothing
  Set objShell = Nothing

  ' makes new zip file in a different directory from extracted .doc
and .txt files - works fine
  Set objShell = CreateObject("WScript.Shell")
  Set objCmd = objShell.Exec("c:\Program Files\Winzip\wzzip -ybc
f:\working\temp\" & intProject & ".zip f:\working\doc\*" & intProject
& ".doc f:\working\doc\*" & intProject & ".txt")
  set objCmd = Nothing
  Set objShell = Nothing

  ' makes self-extracting .exe in a different directory from new zip
file - fails every time
  Set objShell = CreateObject("WScript.Shell")
  Set objCmd = Shell.Exec("c:\Program Files\pkware\Zip2Exe
f:\working\temp\" & intProject & ".zip f:\working\exe\")
  set objCmd = Nothing
  Set objShell = Nothing
End If
set objFSO = Nothing

Executing the WinZip command-line programs from the page works fine.
Every time I try to execute Zip2Exe I get:

WshShell.Exec error '80070005' 

Access is denied. 

/myfile.asp, line ###

I've changed the permissions on Zip2Exe to match the permissions on
the WinZip tools wzzip and wzunzip to no avail. I've tried writing a
batch file that is called by wshShell.Exec and having that call
Zip2Exe with no luck. The Zip2Exe command does work if executed
manually on the command line so I know the program and the command
both work. It's obviously a permissions problem but I'm stumped as
where to look next. Any suggestions will be greatly appreciated.

Mark DuPrey

2. with WshShell Object - ASP

3. WshShell.Run & ASP - Return code is always 1

Hello

I have a problem somewhere and I cannot figure it out, whatever I do the 
return code I get from trying to run a VBS from an ASP page via the WSH 
Shell object, always returns 1.

I don't think this is a problem with the vbs file permissions or the 
permissions on cscript.exe, both of which I have granted full control to for 
i_usr and i_wam whilst trying to work out what is going on.  I have also 
forced authentication by disallowing anonymous access and logged in as 
Administrator to no avail.

The WScript file contains one line, WScript.Quit.

I am on W3K3/IIS6 and the only thing I can think of is that there is some 
policy setting or some other security option that is preventing scripts from 
being run.

Does anyone have any pointers,  I have been googling for ages but nothing.

Thanks in advance

David



4. vbscript WshShell.exec call in ASP

5. IIS 6 and the command "RetCode = WShShell.Run"

Hello All
Currently migrating to Server 2003 w/ IIS 6 from NT4 IIS 4. One of the 
problems I have come accross in some ASP pages is the command 
RetCode = WShShell.Run ("c:\path\program.bat",1,true)

Use to work fine with IIS 4, no longer the case.
I have altered permissions for cmd.exe and cscript.exe to run with users
IUSR_servername and IWAM_servername ( reluctantly ) to no avail.

Any suggestions out there. 

6. need sample of activex WSHShell.CreateShortcut

7. WshShell in ASP Page

I have an asp page where I'm trying to take a text file and add it to an
existing self extracting executable.  I'm using a WshShell.Run command, but
for some reason it isn't working.  If I run the same command at a command
line on the server, it works perfectly.

WshShell.Run("%comspec% /c pkzipc -add=update -silent d:\apps\county.exe
d:\apps\county.txt")

Any one know why it wouldn't run in my asp page?
Thanks!


8. Problems running remote batch copy from wshshell asp script