chmod and file permissions

chmod has two different ways to use it, symbolic or octal(numeric). When you look at a "ls -l" command and its spews forth the directory information followed by:

drwxrwxr-x digitalgeek/digitalgeek 0 2002-12-26 16:43:24 dog/
-rw-rw-r-- digitalgeek/digitalgeek 10240 2002-12-26 15:16:17 dog/archive.tar
-rw-rw-r-- digitalgeek/digitalgeek 9 2002-12-24 04:27:28 dog/file1.txt
-rw-rw-r-- digitalgeek/digitalgeek 10 2002-12-24 04:27:41 dog/file2.txt
-rw-rw-r-- digitalgeek/digitalgeek 11 2002-12-26 15:45:21 file3.txt

such as in the case of DG here, notice the -rw-rw-r--
this notacion stands for being either readable, writable, and/or executable(non of his files were executable).
There are three different colums of "rwx" for the different owners the first is for g or group the second is o other and third is u user.

Using symbolic notation,
a = all (g, o, and u)
g = group
o = other
u = user

+ = add a setting
- = remove a setting

r = readable
w = writable
x = exectuable
s = set to this UID or GID

so you can:

chmod a+rx file1.txt

this will allow everyone to read and execute the file but they cannt write to it or modify it.

using octal notation

0 = ---
1 = --x
2 = -w-
3 = -wx
4 = r--
5 = r-x
6 = rw-
7 = rwx

using octal notation you can set the same permisions to that file by

chmod 555 file1.txt

the first number is for the group permissions, second is other permissions and third is user permissions.