Subject: website
From: George Francis
Date: 7/2/2006 8:56 PM
To: Abby

If you're impatient, here is a "dry recipe", else wait for a moment when I can show you directly on a pooter.

This email also contains a relevant lesson on unix (though with the usual transmogrifications, it applies to Windows boxen too.) A webserver (the thing you address when you write http) runs on a computer as a daemon, called httpd. When a message like http://new.math.uiuc.edu/im2006/watt/ arrives on new.math.uiuc.edu the httpd looks into the directory with a much longer path, something like /var/www/html/im2006/watt/ . If there is no subdirectory named watt then an error is reported (something like, I can't find this website.) If it does find this directory, and the directory permissions are appropriately set, then it will reveal the contents of this directory. If there is a file named "index.html" in watt/ (I put a / after the name of a directory to indicate its nature) then it will open that file, and *not* reveal any other files in the directory, except those explicitly linked in the index.html.

The way Stuart Levy has rigged it, you and all other REU students have read-write(!)-execute privileges for all files in im2006/. You're supposed to write only into your own. But you can look into other directory and steal stufff you might want to edit in your own directory.

Now, when you log into new.math.uiuc.edu, by logging into any of the macs, or from a PC using an ssh "client" (i.e. an application that is designed to connect to new.math.uiuc.edu via the secure shell (ssh)). You will then find yourself in a different place on new, namely /b1/im2006/awatt2/. Despite the name "im2006" in the middle of the path, this is a different place than where the httpd is going to look for your stuff.

What to do?

Well, you can, each time do
cd /var/www/html/im2006/watt/
each time you want to work in your directory, and you can copy stuff there
cp stuffe /var/www/html/im2006/watt/
but it would be much nicer if you could just cd and cp to a simple name like foo.

Of course, you would soon forget what foo means, so we'll agree to give it a sensible name. In your home directory (which is /b1/im2006/awatt2 but which you can reach from anywhere by simple executing
cd
) do this
ln -s /var/www/html/im2006/watt .
and you'll have a link to that directory, just called "watt" right in your home directory. To this you can
cd watt
cp stuffe watt
etc.

One last item. Suppose you don't create a file watt/index.html just yet. And suppose stuffe is really a neat picture, say neato.jpg, and you copy it into your webspace. Why can't you see it in the browser? The reason is that the security nazis have rigged it that when you take a screen-print, for example, the unix permissions are such that only you can see it, not even the httpd. To make stuff visible to the httpd you need to set permission thus

chmod 775 neato.jpg

before shipping it to watt/. If you forget, you'll have to go there
cd watt
and again do
chmod 775 neato.jpg

then try the browser.

Of course there are "easier" ways to do this. But they are context specific. In a different context (machine, operating system, editor, browser) the shortcuts won't work. But Unix is universal, even in Windows lurks enough unix for these purposes (though it's much harder to figure out how to do it generically.)


Cheers,
G