Chapter 3.

Creating The Necessary Directories


All the directories that you need, can be made by using the mkdir command. The directory where you will keep all your Mosaic home page related files is your public_html directory. The syntax for creating directories is: mkdir filename. When you do a listing of the files, the new directory will have a dat the beginning of the permissions.

Let's take a moment to discuss permissions. The UNIX command chmod changes the file-access permissions on a given file or files, or on the contents of an entire subdirectory. Only the owner of the file or a privilaged user can change the mode of a file. There are two ways to change permissions: through symbolic or numeric. I will show you numeric. To get the current permissions, use ls -al on your directory. There are three sets of letters drwxrwxrwx. The d just stands for directory. The next set of letters mean:

The rwx groupings are arranged like this: d directory rwx owner rwx group rwx world, in that order. They are represented numerically in octal notation. This is a form of numeric representation which translates a three digit binary to arabic numbering. The word octal means eight. Thus the arabic representations go from 0 to 7. Zero in octal is 000. One in octal is 001. To count in octal you actually increment a three digit binary.

Follow the table below.

octal   arabic   UNIX permission
000       0      ---
001       1      --x
010       2      -w-
011       3      -wx
100       4      r--
101       5      r-x
110       6      rw-
111       7      rwx

A number 400 means the owner has read permission. The 400 permission looks like: -r--------. A 423 means that you, the user can read the file, users in your group can write to the file and the rest of the world can write and execute the file. The 423 permission looks like: -r---w--wx. A 777 permission appears as: -rwxrwxrwx, and a 000 permission appears as: ----------.

Remember that there are three sets to a permission, owner, group, user. Follow the list above if you run into trouble changing permissions. What you need to do is change the permissions on the . and .. directories so the rest of the world will be able to view your home page. To do this follow the syntax below and type this at the terminal.

cd ~/public_html
chmod 711 .

chmod 711 ..

whenever a new file is created, you will need to update your permissions on that file for these files, use this syntax below. Remember that the permissions on the directories must be 711.

chmod 744 filename

Let's move on.


Go to Chapter 4.

Go back to Chapter 2.

Go back to the Main Screen.