Return CGI Library
Return to CGI-Wrap
cgiwrap - CGI Wrapper for HTTPd WWW Server
CgiWrap is a gateway program that allows general users to use CGI
scripts and HTML forms without compromising the security of the http
server. Scripts are run with the permissions of the user who owns the
script. In addition, several security checks are performed on the
script, which will not be executed if any checks fail.
Cgiwrap is used via a URL in an HTML document. As distributed, cgiwrap
is configured to run user scripts which are located in the
(~/cgi-bin/ directory on BareMetal)
The server that the script is located on. Port is optional.
The common cgi directory on the http server.
The userid of the user who owns the script that is to be run
The actual filename of the script that is to be run.
INSTRUCTIONS (UMR TEST WEB-SERVER)
The following are instructions for setting up your directories and
scripts for execution on UMR's test web server.
The instructions are intended for use with AFS. It is assumed that you
are familiar with writing CGI scripts and writing HTML documents for
the WWW. If not, see one of the URL's listed at the bottom of this man
page for more information.
For this example, the script is "email.pl". The user id is "joeminer".
Create the directories needed to hold html documents and scripts
2. mkdir cgi-bin
Install the script into the cgi-bin directory, along with any related
The script is executed using the following URL:
Cgiwrap can be used with forms, but it is suggested that you use the
"POST" method. If you use the get method, you will need to add two
hidden fields to your form containing the user and script name. "GET"
types requests are discouraged in any case due to the limited amount
of data that can be passed to the script.
I suggest installing 4 copies of cgiwrap into the servers cgi-bin
directory. (cgiwrap, cgiwrapd, nph-cgiwrap, nph-cgiwrapd) This will
allow your users to run almost any kind of script. The two ending in
"d" will display debugging output, which is a great aid when writing
CGI scripts, as you usually can't see the output of your script if it
screws up. These 4 "versions" are present at BareMetal.
Nathan Neulinger (firstname.lastname@example.org)