CCCCGGGGIIIIWWWWRRRRAAAAPPPP((((1111)))) AAAA////UUUUXXXX CCCCGGGGIIIIWWWWRRRRAAAAPPPP((((1111)))) NNNNAAAAMMMMEEEE cgiwrap - CGI Wrapper for HTTPd WWW Server SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS http://server:port/cgi-bin/cgiwrap?user=USERID&script=SCRIPTNAME DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN 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 ~/public_html/cgi-bin/ directory. sssseeeerrrrvvvveeeerrrr::::ppppoooorrrrtttt The server that the script is located on. Port is optional. ccccggggiiii----bbbbiiiinnnn The common cgi directory on the http server. UUUUSSSSEEEERRRRIIIIDDDD The userid of the user who owns the script that is to be run SSSSCCCCRRRRIIIIPPPPTTTTNNNNAAAAMMMMEEEE The actual filename of the script that is to be run. IIIINNNNSSSSTTTTRRRRUUUUCCCCTTTTIIIIOOOONNNNSSSS ((((UUUUMMMMRRRR TTTTEEEESSSSTTTT WWWWEEEEBBBB----SSSSEEEERRRRVVVVEEEERRRR)))) 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 1. cd 2. mkdir public_html Page 1 (printed 2/5/95) CCCCGGGGIIIIWWWWRRRRAAAAPPPP((((1111)))) AAAA////UUUUXXXX CCCCGGGGIIIIWWWWRRRRAAAAPPPP((((1111)))) 3. mkdir public_html/cgi-bin Set permissions on directories 4. fs setacl . system:anyuser l 5. fs setacl public_html system:anyuser rl 6. fs setacl public_html/cgi-bin system:anyuser rl Install the script into the cgi-bin directory, along with any related files. The script is executed using the following URL: http://www.umr.edu:2520/cgi-bin/cgiwrap?user=joeminer&script=email.pl NNNNOOOOTTTTEEEESSSS When using cgiwrap with AFS based accounts, you need to keep in mind that scripts are run un-authenticated. This means that any files that are accessed in AFS directories are accessed as "system:anyuser". This is important when considering how your script will return data to you. Currently, the easiest way to return data to the user is to email the results of the script. Obviously, this only applies to scripts that are supposed to be used for submitting data - scripts that simply return information to the web client are not affected by this. 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. FFFFIIIILLLLEEEESSSS HTTPD/cgi-bin/cgiwrap ~USERID/public_html/cgi-bin/SCRIPTNAME AAAAUUUUTTTTHHHHOOOORRRR Nathan Neulinger (nneul@umr.edu) SSSSEEEEEEEE AAAALLLLSSSSOOOO Mosaic, lynx http://sunsite.unc.edu/boutell/faq/www_faq.html http://hoohoo.ncsa.uiuc.edu http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLQuickRef.html Page 2 (printed 2/5/95)