IIS Server Security >> CGI execute permissions

by QnJpdHQgVGFib3I » Fri, 30 Jul 2004 21:21:03 GMT

I have a perl script that needs to query the registry (reg.exe QUERY) and return the value to the webpage. The script runs fine from the command line but when run from the webpage it tells me access denied. I do a lot of linux bash stuff and there is a sudo command and I know windows has a runas but it requires you to type in a password which can't be done from web. So how do I give the perl script permission to READ only, the registry?

IIS Server Security >> CGI execute permissions

by jeff.nospam » Sat, 31 Jul 2004 00:41:03 GMT


On Fri, 30 Jul 2004 06:21:03 -0700, "Britt Tabor" <Britt



It's not the Perl script, it's the account the Perl script is running
under. In the case of an anonymous web user, this is the Anonymous
account, normally IUSR_{MachineName}. That account has to have access
to the key in the registry, and you can set that access in RegEdit.
Check a Perl group to see how to run a script as a different user, if
it's possible in your case.

Jeff

Similar Threads

1. #exec cgi problem: lack of execute permission. - IIS Server Security

2. Problems executing a CGI from a CGI in IIS6 (works in IIS5)

We have an web-package that is driven from CGI .exe's on the server 
written in Delphi.  This works fine, starting the CGI's from a URL.

However, one of our search processes needs to, if it receives a 
particular search key, run a separate exe to do a molecular substructure 
search.  The exe is written in Visual C++.

In IIS5 and Apache this works correctly and performs the search.  From 
the command line and a static non-web program, the program works fine in 
Win2K3.  In IIS6 however, the second-level cgi.exe is never started.

Can anyone cast any light on what permissions might be controlling this, 
and if there is something configurable which might fix this?  We need to 
roll the new version out in the next two weeks, and are going to get a 
lot of questions from IIS6 web-server operators.

Karl
 XXXX@XXXXX.COM 

3. Failed to execute CGI : Win32 Error Code = 3 = I give up

4. Unable to execute CGI app

Hi,

I have a very simple CGI .EXE application written in Delphi that
retrieves POSTed data and inserts it into a SQL Server table. When I
deploy it to a Win2003 Server (IIS 6.0) I receive 405 error - method
not allowed (invalid HTTP verb). If I use GET instead of POST
everything works fine. The most curious thing is that when I use POST
the app executes too (the record gets inserted into the database), but
the browser displays the 405 error message.

I've followed Microsoft David Wang's suggestions I've read in this
forum, but anyway the 405 continues to appear:

**********************************************************
Since CGI EXE and ISAPI DLL are intrinsically executable by IIS, they
do not
need Application Configuration.  Application configuration is only
used for
scripts (i.e. ASP pages are not executable -- it is script code that
needs
to be compiled/interpreted by something else to generate a response).

All you need to configure:
1. /cgi-bin  needs to have "Scripts and Executables" permission --
this
tells IIS to allow .EXE to be accessed as an executable instead of a
static
file
2. Full-Path-To-cgimail.exe needs to be added to Web Service Extension
and
enabled -- this allows IIS to allow that .EXE to actually execute in
memory.

No need to configure anything else to execute a CGI on the server.
**********************************************************

Anybody could please give me further ideas...

Best regards,

David Hernandez

5. Executing a .EXE CGI program

6. Compiled binaries with .cgi file extension not executing

Hello to all,
    I set up IIS6, my HTML pages work fine, and my linked HTML pages work
fine. However, the cgi binaries will not execute. IIS sends them as a file
download. After exhausting every avenue I know of, and after several
hours... how can I get the files to execute? I set a few configurations last
year when I put together a similar project, but it was a snap at that time,
and I did not record what I did successfully then (not a good idea).
    Tonight, I set execute permissions to "Scripts and Executables". I added
the .cgi file extension, and I set the application mapping to the path/file
I wanted to execute. Still I only get a file download dialog when I go to
execute the cgi file using a submit button to call the cgi program. The cgi
files are compiled C binaries, which I previously debugged and deployed over
a year ago. How should I change the configuration settings in order to get
the cgi files to execute?

TIA,
Ralph in Boise



7. IIS 6 and Perl Failed to execute CGI : Win32 Error Code = 2

8. Executing a .EXE CGI program on IIS