University of Washington, CSE 190 M, Spring 2007
Uploading & Protecting Your Files

Sometimes you will need to put files on a web server, rather than loading them from the computer you're working on. In this case, you will need to use the web space that the University grants to you as a student.

If you are uploading a homework assignment, you must follow instructions for protecting your files from being viewed by other students.

Step 1: Enabling Your Web Space

Before you can upload anything to the web server, you will need to enable the web hosting service for your UWNetID.

  1. Visit the following page: https://uwnetid.washington.edu/manage/?service
  2. Check to be sure that the Dante Account and Web Publishing services are enabled (or Student Web Publishing if you are also University staff).

    If they are not enabled:

    1. Check the boxes next to those services in the Turn On column and click Continue.
    2. After you click Continue you will be shown the UWNetID policies governing the use of your account. Click Finish when you have reviewed these.
    3. Wait while the services are enabled.
    4. You may see an error message after enabling the services. If this occurs, go to Turn services on or off (on the left-hand side) and check to see if the services you just enabled are now on. If they are, there shouldn't be any problem. If not, just try it again.

Step 2: Uploading Files

Files are uploaded using a protocol called FTP. We will be using the secure variant, SFTP. You will need an SFTP-capable file transfer program to upload files to your web space. All University computers have the necessary program to do this.

To do this from home you will need to download the appropriate software:

Note: The procedure for uploading will differ slightly with other programs. The instructions below are for Tectia SSH.

  1. In the IPL, double-click Save to your Account on the Desktop and enter the password you use with your UWNetID. (At home, launch your SFTP client and connect to dante.u.washington.edu with your UWNetID and password.)
  2. Double-click public_html (or student_html if you are also University staff).

    → This directory is called the root directory of your web space.

  3. Drag a file from your local computer into the root directory. It will be uploaded.

    The Tectia SSH client on Windows may give an error that you "encountered errors". This message is because Tectia is trying to set permissions on the files in an invalid way for our server. The message can safely be ignored.
    errors
    This error can be ignored.

Any file you drag into the root directory will be viewable on the web immediately, at the following location:

http://students.washington.edu/your_UWNetID/folder/filename

Step 3: Creating a Directory Structure (optional)

You may wish to create a directory structure for your labs and assignments to organize them neatly, make it easier to protect your assignments, and to separate your CSE 190 M coursework from the rest of your website.

To create a new folder, right-click in your web space and select New Folder, then give the folder a name. For example, if you would like to create a folder for your CSE 190 M coursework, you might name the folder cse190m.

Any file you drag into this new folder cse190m will be viewable on the web immediately, at the following location:

http://students.washington.edu/your_UWNetID/cse190m/filename

Following is an example of a good directory structure you could create for the coursework you will be doing in this class:

Step 4: Protecting Your Homework

In order to prevent other students from viewing (and stealing) your code, you will need to protect your homework assignments from prying eyes.

To do this, you will create a special server configuration file which will grant you and the instructors access to your homework (by having us log in with our UWNetID and password), but will deny everyone else access.

  1. Start by creating a new file, and entering (or pasting) the following information:

    
    AuthType UWNetID
    Require user stepp mdoocy kkuan jprouty helenem brharris your_UWNetID
    Order allow,deny
    Allow from w3.org
    Satisfy any
    
  2. Replace your_UWNetID with your UWNetID.
  3. Save the file with the name .htaccess (don't forget the dot!)
  4. Upload your new .htaccess file to the cse190m/homework/ directory (or whichever directory you will be putting your homework assignments in)

    → You might have trouble finding the file, since a . (dot) creates a hidden file on some systems. If that is the case you'll need to find an option in your SFTP client for showing hidden files.

This will password-protect everything inside your cse190m/homework/ folder, including any subdirectories.

To view your homework, simply enter its address into your web browser, and you will be redirected to the UWNetID login screen. Log in with your UWNetID and password, and you will be directed to the original address you entered. You will remain logged in until you exit your web browser.

→ If you are already logged in to any other UW service with your UWNetID, you will not be prompted to log in.

→ This will also grant access to the W3C's XHTML and CSS validators, so you will be able to validate pages without having to paste in your code manually.

Valid XHTML 1.0 Strict Valid CSS!