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.
-
Log on to UTS or CCWF.
-
Change to your home directory by typing:
cd $HOME/
-
Make sure file permissions for your home directory are set correctly
for Web publishing by typing:
chmod 711 $HOME/
-
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/
-
List the files in your public_html directory by typing:
ls $HOME/public_html/
-
If cgi-bin is not listed, type
mkdir $HOME/public_html/cgi-bin
-
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
-
Create a directory in which to save HTML and text files for this
tutorial by typing:
mkdir $HOME/public_html/tutorial_files/
- 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.
|