Publishing Personal Web Pages with SSH

Publishing Web Pages with SSH

Activate your uNID and Password

If you have used your uNID and are familiar with your account on home.utah.edu (previously called u.cc.utah.edu), you don't need to anything.  Otherwise, please be sure you have created a secure password in the Campus Information System since March 25, 2003.

Login to home.utah.edu

Login to home.utah.edu with SSH using your originally assigned Network ID (username) and password.

Get into a UNIX Shell

Choose c (for UNIX Command shell (csh)). This will give you a C Shell, which is like a DOS Command Line.

Change to Your Home Directory

Note: If you just came from the menu, you should be in your home directory. A directory is a place where files go. A UNIX directory is just like a DOS directory. If you are familiar with the Macintosh, a UNIX directory is like a folder. Each user on a UNIX machine is given a directory in which to store files. This default directory is referred to as a home directory. To change to a different directory, use the cd (change directory) command.

Example: cd /bin

This would take you to a directory called 'bin' at the root level of the machine.

Example: cd /usr/local/bin

This would take you to a directory called 'bin' which is located in a directory called 'local' which is located inside of a directory called 'usr' at the root of the machine.

Change Directory Command

For additional help with the 'cd' command, read the manual page from the UNIX online help.

To access a manual page type: man command

To access the cd manual page the command would be: man cd

Change to your home directory by typing: cd ~NID

Create a Directory Called public_html

Make sure you are in your home directory by typing pwd (pwd is print working directory). To create a directory in UNIX you use the 'mkdir' command.

Type the following to create the public_html directory:
mkdir public_html

For more information on the mkdir command, read the manual page on mkdir for additional help.

Verify the new directory exists by displaying a listing of the directory. The 'ls' command will show you the contents of the current directory.
Type: ls

You should see a directory called 'public_html'.

Give the World Read-Rights to public_html

This means you set the permissions on the directory (and eventually on the files so that everybody can read them). By default, most users files are created so only they can read and write them. To change the permissions on your directories and files you use the 'chmod' command.

Look at a directory listing to see what the permissions are. Type    ls-Is You should see something that looks like the following:

-rw------- 3 abc1 ugrad  342 Dec 12 08:01 file.txt
drwx------ 2 abc1 ugrad 2048 Dec 11 12:41 mail
drwxr-xr-x 3 abc1 ugrad   96 Dec 11 12:33 public_html
drwx------ 3 abc1 ugrad   96 Dec 9  11:55 tmp

Notice the fields that look like drwx------ at the left hand side of each line. These are known as the permission bits. What do they mean?

The first letter of the eight (*--------) tells the type of file. '-' is a regular file and 'd' is a directory.

The next three (-***------) show the owner's permissions. 'r' is for read access, 'w' is for write access, and 'x' is for execute access on a file and search access on directory.

The next three (----***---) show the group's permissions. The codes are the same as for the owner.

The final three (-------***) show what other's (anyone) permissions are. The codes are the same as for the owner.

To change the permissions, use the chmod (change mode) command. The chmod command has the form  'chmod who + permissions name'  where who indicates user (u - owner of the file or directory), group (g), other (o) or all (a) and permissions are read (r), write (w), or execute (x). Name is the name of the file or directory being changed. The plus (+) sign indicates which permissions are being "added." To remove permissions, use the minus (-) sign.

Examples:          

This sets the read permission for others on the file index.html.

chmod o+r index.html

This command removes read and write access from mydirectory for users in the owners group.

chmod g-rw mydirectory

This command sets the directory public_html to be world readable and searchable.

chmod a+rx public_html

Change the Working Directory to public_html

To change the working directory to the public_html directory, type:

cd public_html

 

For More

For More Information

Product and Service Information

Frequently Asked Questions

More Frequently Asked Questions

Information on department or organization web pages

For questions or problems, please contact the Help Desk at 581-4000 option 1.