Putting your home page on Ouray
 
Once you have created your home page in Ouray, you need to go through a
short procedure to make it accessible to folks who'd like to view it using
a graphical browser.  This requires a bit of UNIX.  I'll walk you through
it step by step.  UNIX is a lot like DOS.  In fact, DOS is a subset of
UNIX.  Those of you who know DOS will recognize many of these commands.
So, please lend a hand to your fellow classmates who may find this
information completely new!
 

Step 1.  The starting point - your top directory
 
The http server expects to see some sort of hierarchical file structure,
much like setting up directories and subdirectories in DOS, or folders on
a Mac.  When you log on to Ouray, the system automatically puts you in
your top directory (some folks call this your home directory - I prefer
top, myself.)  You can find out what your top directory is called by
invoking the pwd command.  This is an abbreviation for "print working
directory".  At the system prompt (%), type
 
	pwd
 
You should see something that looks like this (with your own login name,
naturally):
 
	/student/graduate/lcsherry
 

Step 2.  Clearing the path - setting public permission
 
Your first step is to grant public permission for anyone on the system to
get into your top directory.  That does not mean they can read your files
or tamper with them in any way - all files are private unless you specify
otherwise.  However, for the system to access your home page, you'll have
to "clear the path" to get to it.  To do this, you invoke the chmod
command.  This is an abbreviation for "change mode".  At the system prompt
(%), type
 
	chmod 755 .
 
Here's how the system interprets that command:

chmod	change mode
755	grant read/write/execute permission to me and read/execute
	permission to anybody else
.	"the directory for which I want you to set the
	permission" (as in DOS, the current working directory is
	always designated by a single period)
 
What do those numbers mean?  I'll translate.  Every computer works in some
combination of binary, octal, and hex.  The chmod command requires three
arguments, so it has to be followed by three digits.  These digits are in
octal, so they can never exceed a value of 8.  

¥	the first number represents the file permission you grant yourself 
¥	the second represents the file permission you grant your class
	(that is, if there are several students who share a joint or "class"
	account, like the Internet Task Force does), and 
¥	the third represents the file permission you grant anyone else on
	the system.
 
Here's how the system interprets those three numbers:

¥	4 = read permission (someone may read your file but not tamper
	with it)
¥	2 = write permission (someone may write to or edit your file)
¥	1 = execute permission (someone may execute a file, like executing
	a program)
¥	0 = no permission at all (permission denied!)
 
Since you always want to be able to read, write, and execute your own
files, you want to keep your own permission set to 7 (i.e. 4 + 2 + 1 = 7).
But you only want to grant read/execute permission to anyone else, so
you'd set both the "class" and the "everyone else" permission to 5 (i.e. 4
+ 1 = 5).  
 
You may have come across the cryptic "Error 403 - permission denied" in
Netscape.  That means the person who created the file forgot to grant
public permission to it.  So, if you ever see that in your own files,
you'll understand what happened and how to fix it.
 

Step 3.  Creating your public_html directory
 
Let's say that you have created your home page in your top directory.  If
you already have a public_html directory, you can skip this sectionÑelse,
skip to step 5.
 
You must first make a directory by using the mkdir command.  For the http
server to access your home page using its default commands, you have to
name that directory "public_html".  The system doesn't give you a choice,
so use the default name.  Type:
 
	mkdir public_html
 
	chmod 755 public_html
 
You have just created a new subdirectory and granted it public permission.  
 

Step 4.  Moving your files into the new directory
 
Now that you have a "home" for your home page, you need to move all the
files from your top directory into that public_html directory.  To do
this, you use the mv command.  This is an abbreviation for "move".  
 
Say you have two files: index.html and stuff.html, and you want to move
both of them into the public_html directory.  You will have to move them
one at a time.
 
	mv index.html public_html
 
	mv stuff.html public _html
 
Voila!  They are moved.
 

Step 5.  Changing directories
 
At this point you are in your top directory, and your important files are
in the public_html directory.  It's always a good idea to issue your
commands from the directory where your files are located, so you want to
change your working directory from your top directory to your public_html
directory (in other words, you want to get into your public_html directory
so you can work on your files.)  Invoke the cd command.  This is short for
"change directory".  Type
 
	cd public_html
 
and you are there!  
 

Step 6.  Listing your files
 
It's a good idea to list your files before you work on them.  Use the ls
command.  This is an abbreviation for "list".
 
	ls
 
The system will show you that you have two files in the public_html
directory, namely, index.html and stuff.html.  
 
The ls command has a long form that you will find quite handy.  If you
type 
 
	ls -al
 
the system will not only show you the files, but also the permissions, the
date of last update, and lots of other worthwhile information.  The first
column of numbers that the system will print out contains information
about file permissions.  For example
 
drwxrwxrwx	this directory has rwx (read/write/execute) permission for
		me and everyone else
-rwxr-xr-x	this file has rwx permission for me and r-x for everyone
		else
 

Step 7.  Making your home page public
 
As before, issue the chmod command:
 
	chmod 755 index.html
	
	chmod 755 stuff.html
 
That ought to do it.  Pretty simple, no?
 

Step 8.  Getting back where you started
 
Right now you are in your public_html directory.  If you type pwd
(remember, print working directory?) the system will show you that.  To
get back to your top directory, you need to go up one directory level.  As
in DOS, the directory above the current working directory is designated by
a double period: "..".  Type:
 
	cd ..
 
and you'll be back at your top directory, where you started.

 
Step 9.  The reality check!
 
Before you launch Netscape, you can easily check whether the http server
can access your home page or not.  Type
 
	lynx http://ouray.cudenver.edu/~yourname
 
where "yourname" is your login name on Ouray.  In case you are working on
Carbon, simply substitute "www" for "ouray":
 
	lynx http://www.cudenver.edu/~yourname
 
Don't forget the tilde (the "~" sign) - the system uses that as a
shorthand to do directly to your home page.
 
If you get an error 403, you need to go through this exercise again and be
sure your permissions are set to 755 for your top directory, your
public_html directory, and all your files.
 
If you get an error 404, the system is telling you it can't find the file.
Perhaps you made a typo, so go back and check to be sure that you have
spelled your filenames correctly.

 
Step 10.  For further information:
 
There is a tutorial called "Build Your Own Home Page" under "Internet Task
Force" on the School of Education Home Page.  That will review what you
have just learned, plus give you a bit more information about sharing
files.
 
There are also lots of tips and tricks, sites for finding resources, style
guides, etc. on the School of Education home page.  Check "Getting
Internet Help" if you get into trouble.  Or check "Online publishing" when
you are ready to turn your home page into a really useful document. 
 
Customize your own home page, as you customize your own hairdo or
clothing.  

Use your home page.  It's a great way to store useful links to
useful WWW resources.  

Share it with your fellow students.  Put your portfolio products online
(that way you won't lose them!).  They can also serve as models for other
students who are wondering what good portfolio items ought to look like.
 
Good luck!
_________________
 
Lorraine Sherry
lsherry@carbon.cudenver.edu
March 15, 1997