The University of Texas at Austin- What Starts Here Changes the World
Services Navigation


Creating a cgi-bin Directory

This exercise describes the processes to create a public_html directory and a cgi-bin directory where you will put your scripts.

  1. Log on to UTS or CCWF.

  2. Change to your home directory by typing:

    cd $HOME/

  3. Make sure file permissions for your home directory are set correctly for Web publishing by typing:

    chmod 711 $HOME/

  4. List all files and directories in the directory you're currently in (if you did step 1, this will be your home directory) by typing:

    ls -a

    If public_html is not listed, type

    mkdir public_html

    If the server responds with the following error:

    mkdir: cannot create public_html

    public_html: File exists
    do not be concerned. If the server responds with any other error, double-check your spelling and try again. If the error persists, please send e-mail to www@www.utexas.edu, include your UNIX username, the server you are working on, a description of what you have tried so far, and the complete text of any errors in your message.

    Make sure file permissions for your public_html directory are set correctly for Web publishing by typing:

    chmod 755 $HOME/public_html/

  5. List the files in your public_html directory by typing:

    ls $HOME/public_html/

  6. If cgi-bin is not listed, type

    mkdir $HOME/public_html/cgi-bin

  7. Make sure file permissions for your cgi-bin directory are set correctly for using cgi scripts by typing:

    chmod 755 $HOME/public_html/cgi-bin

  8. Create a directory in which to save HTML and text files for this tutorial by typing:

    mkdir $HOME/public_html/tutorial_files/

  9. Make the cgi-bin directory you just created your current working directory by typing:

    cd $HOME/public_html/cgi-bin

Congratulations: you are now ready to create your first script.

 

 

 


  Updated 2006 August 14
  Comments to TeamWeb