Home FAQ's Section 3 How can I setup a CGI program?
How can I setup a CGI program? PDF Print E-mail

You are responsible for ensuring that your script does not breach system security. If your script is found to be insecure, we will need to disable it. We will not debug security problems in scripts.

To run your own cgi scripts, you must follow these steps:

  1. You must agree to the terms of the CGI Security Policy. If the terms are ok, email your request for authorization, including your statement that you have read and understand the CGI Security Policy to: This e-mail address is being protected from spambots. You need JavaScript enabled to view it .
    We will then grant your account authorization to run scripts on the cgi server.
  2. If it does not already exist, create in your home directory a directory named "public_html" with the mode 755. If the directory does already exist, make sure it is mode 755.
  3. If it does not already exist, create in public_html a directory named "cgi-bin" with the mode 755. If the directory does already exist, make sure it is mode 755.
  4. Place your cgi scripts in ~user_name/public_html/cgi-bin. They must be named "file_name.cgi". They should be mode 711
  5. Your scripts must conform to the security model described at http://httpd.apache.org/docs/suexec.html. Please read this document carefully; if your scripts do not conform to its requirements, your scripts will not execute.
  6. If all of the above conditions have been met, you should be able to execute your script using the address:

    http://cgi.engr.ucsb.edu/~yourlogin/cgi-bin/filename.cgi
 
Copyright © 2012 The Regents of the University of California, All Rights Reserved.