Animated Ball UMUC Logo
http://polaris.umuc.edu/~flazarus/

Uploading a Web Page to a UNIX Host


You need to be fairly familiar with UNIX permission statements and file management to accomplish the upload task, which is essentially a multi step process. At this point a good book on UNIX would be helpful. Also, you might check the University of Edinburgh's UNIX Help pages.

There are several way to upload a Web page to a unix host. Probably the easiest is to use PortaPuTTY tailored specifically for UMUC.

An alternate approach is to use WS_FTP LE

http://www.uottawa.ca/help/ws_ftpe.html

Since WS_FTP, a prior UMUC standard, is no longer generally available you can try Core_ftp_le another prior UMUC standard.

Finally there are telnet applications that, in addition to up/down loading, give you exceptional access for manipulating UNIX.

One advanced telnet application with up/down load capability is NetTerm (nt32520i.exe).

It is necessary to prepare your site before you start uploading files. The information below assumes NetTerm is used.

1. Prepare your site by creating the appropriate directories.
  1. a directory named 'www' below (i.e., a child of) your home directory
  2. a set of topic directories below www.
2. chmod these directories 711
3. upload HTML and graphic files into the appropriate directories
4. chmod all files 644

Let us take a look at the permission issue. A snippet of the result of an ls -l command for a typical home directory is shown.

drwx------   2 smith faculty      512 Jul 24 16:22 class
-rw-------   1 smith faculty    49908 Jul 15 14:23 fabric.txt
drwx------   2 smith faculty      512 Jul 24 16:21 fwr
-rw-------   1 smith faculty     8087 Jul 19 17:29 good_mt1.txt
drwx------   2 smith faculty      512 Jul  6 02:14 junk
drwxr-xr-x   2 smith faculty      512 Jul 22 17:20 share
drwx------   2 smith faculty      512 Jun  9 16:12 tycho
drwx--x--x   9 smith faculty      512 Jul 26 00:08 www

The first 4 columns shows two things, whether the listing is for a (d)irectory or a (-)file and the access permissions (r)ead, (w)rite, or e(x)ecute for the owner (Smith). The permission for two additional groups, faculty (an arbitrary UNIX directory), and everyone else is indicated by the remaining columns.

Permission can be set using a variety constructs. Let us review the "absolute" permission construct which is so called perhaps because they are absolutely impossible to remember!

The Code: --- read permission = 4, write permission =2, execute permission =1, no permission =0

*** So making a table with an example (the UNIX commands are in color):

chmod permission commands-directories
Owner Group Other
Read 4 0 0
Write 2 0 0
Execute 1 1 1
----- ------ ----- -----
Sum 7 1 1




  Then 'UNIX Prompt> chmod 711 directory_name'   Where:

1. chmod = change mode
2. 711 = sets the "permission" for a directory that allows, you the owner, full read/write/execute access to all files within a directory. All others have very limited access. They can neither read nor write files within the directory.




chmod permission commands-files
Owner Group Other
Read 4 4 4
Write 2 0 0
Execute 0 0 0
----- ------ ----- -----
Sum 6 4 4


  Then 'UNIX prompt> chmod 644 file_name'    Where:

1. chmod = change mode
2. 644 = sets the "permission" for a file allowing you, the owner, read/write access. All others are limited to read only. Since we are addressing only ascii files execution has no meaning. Only binary (compiled) program files need be 'executed.' Other program files, such as JavaScript or Perl files, are not compiled and remain in ascii format.



Grant world execute access to your home directory.
UNIX prompt> cd (moves to your home directory.)
UNIX prompt> chmod 711 . (grants group and world execute access. Don't forget the dot.)
UNIX prompt> ls -ld (verify that the permissions have been set correctly)
e.g., drwx--x--x 6 Smith faculty 1024 Jul 29 14:00


Create a child directory named "www" under your home directory. This is where you will place your index.html file (the top page of your Web site). Grant world execute access to this directory.
UNIX prompt> cd (moves to your home directory)
UNIX prompt> mkdir www (creates the www directory below your home directory)
UNIX prompt> chmod 711 www (grants group and world execute access)
UNIX prompt> ls -l (verify that the permission has been set properly for www)
e.g., drwx--x--x 9 Smith faculty 512 Jul 26 00:08 www


Create as many child directories beneath www as you may need to organize your pages, such as graphics, topic1, topic2, and so on. Grant world execute access to all these directories.
UNIX prompt> cd www (moves to your www directory)
UNIX prompt> mkdir graphics (creates a graphics directory)
UNIX prompt> chmod 711 graphics (grants group and world execute access.)
UNIX prompt> mkdir topic1 (creates a topic1 directory)
UNIX prompt> chmod 711 topic1 (grants group and world execute access)
UNIX prompt> ls -l (verify that the permission has been set properly for graphics, topic1 etc.)
e.g., drwx--x--x 8 Smith faculty 512 Jul 29 10:08 graphics


Upload your HTML and graphic files to the appropriate directories. Edit these files as required. Grant world read access to all these files (chmod 644 file_name). Grant world access to all relevant directories (chmod 711 directory_name).
Access your Web page via

"http://computer.umuc.edu/~user_ID/secret_file_name"

keeping your vectoring page address secret for 386 assignments.

For a page that is to be generally accessible use

"http://computer.umuc.edu/~user_ID/".

Where computer = either nova or polaris state side. Other servers are used in Europe and Asia so of course the appropriate server name needs to be used.



upback to top

Valid XHTML 1.0!

Go BackBack to last page
Back to the Index CMST 385
Back to the Index CMST 386
Back to the Index CMST 450