WebTeam Workshops


Module 1:
HTML Basics

Module 2:
UNIX

•Obtaining a UNIX Account
•Preparing your Account
•Creating Directories
•Changing Directories
•Setting Permissions
•Common UNIX Commands

Module 3:
Tables

Module 4:
e-Portfolio

Module 5:
Web Accessibility

Module 6:
CSS


glossary

disclaimer

Module 2: UNIX

Setting Permissions in UNIX

In order for your directories and files to be viewed on the Web, you need to give people permission to see your files. There are three types of permissions:

r - read
w - write
e - execute

And three settings (or people) to establish permissions for:

u - user (you)
g - group (everyone else using the UHUNIX server)
o - other, usually called world (everyone else on the Internet)

a - all (user, group, other)


Text-Based

When you view your files, you can see the permission settings. For example:
drwxr-xr-x 5 kmorgan uhmstud 1024 Oct 14 21:05 public_html
so ­ can really be viewed in four parts:

file type  user   group   other 
d rwx r-x r-x

You can change permissions by using the chmod command.
+ adds a permission
- takes away a permission

When you change permissions, you first give the chmod command, followed by the settings that you are going to change, then the function you want to perform (add or take away), the permissions you want to apply and then the name of the file or directory that you want to change.

Your public_html and all the directories in it must be world executable in order to be viewed on the Web. To change the permission, type:
%chmod o+x public_html

All the files in your public_html directory must be world readable:
chmod a+r filename.

It is a good idea to restrict the write command to the user only. This prevents other people from tampering or altering your files. If you authorize permission, never be surprised what some people will do. Protect your files!


Graphics-Based

SSH
Right-click the folder or file and choose "Permissions"

Fugu
Click on the folder or file and click on "Info" in the above toolbar, or hold down the Open-Apple and i keys on the keyboard.

All files and folders must be readable in order to be read online and by you. Check all the boxes under "read."

Your public_html and all the directories/folders) in it must be other executable in order to be viewed on the Web. Check all the boxes under "execute" for every folder/directory.

You need to be able to write to your own files; Check the box under "owner-write"

It is a good idea to restrict the write command to the user only. This prevents other people from tampering or altering your files. If you authorize permission, never be surprised what some people will do. Protect your files!

Next: Common UNIX Commands (text-based) »


top of page