| |
CGI-wrap on Condor
NOTE: If you would like to use cgiwrappers on www.wesleyan.edu, please see
this page.
Setting up the Directory
To set up your Condor account for CGIwrap, create a subdirectory called cgi-bin within your public_html directory. Do this by navigating to your
public_html directory and typing
All CGI scripts must be placed in this cgi-bin subdirectory.
Setting the Permissions
Make sure that the cgi-bin directory has the correct permissions. It
needs to be executable, so type
to make the cgi-bin directory executable.
Also remember that the scripts themselves need to be set as executable so
you'll need to type
(where scriptname is the name of your CGI script) on each of your scripts
so that they'll function properly.
You will also need to be sure the group owner of your script is your
default group. To find your default group you should type
Most users only have one group, but if you have multiple groups you need
to use the first on listed. To set the group ownership of the script to
your group you should type
chgrp groupname scriptname
(where scriptname is the name of your CGI script and groupname is the name
of your group)
Calling the CGI script from your HTML form
Using CGIwrap, this is how your scripts must be called in the ACTION tag
of your form:
http://condor.wesleyan.edu/cgi/userid/scriptname
note:userid is your condor account name and scriptname is the name
of your cgi script
Debugging your CGI script
For debugging information go to the URL:
http://condor.wesleyan.edu/cgid/userid/scriptname
note:userid is your condor account name and scriptname is the name
of your cgi script
Security Features
Cgiwrapper is software designed to limit the damage a user could
potentially do to the system through a CGI script. Cgiwrapper runs CGI
scripts as the owner of the script, rather than as the user nobody which
may have more permissions.
CGIwrap test
The following is an example urls associated with a script being run with
cgiwrapper.
Run the script:
http://condor.wesleyan.edu/cgi/userid/testme.pl
Check out the debugging info:
http://condor.wesleyan.edu/cgid/userid/testme.pl
|