aarenot:
CHMOD is a Unix/Linux command.
It's short for "Change Mode".
A file in the *nix filesystem has, essentially, 3 permissions that can be set.
Permissions for the OWNER, permissions for users in the same GROUP, and permissions for everyone else.
It's easiest represented in binary.....
EXECUTE WRITE READ
4 2 1
.... So, to set OWNER with Read, Write, Execute, GROUP with READ ONLY, and everyone else with NOTHING would be:
710 <---- 7 being the sum of "Read, write and execute", 1 being "Read", and 0 being Nothing. The first number (7) represents the owner, the second the group, and the third everyone else.
To give everyone full permissions would be 777
Owner full, everyone else nothing, 700
... etc.
When you look at a ls (list... the equivelant of a dir command in dos) you see something like this:
Code:
-rw-r--r-- 1 root root 8510 Jan 25 2003 htdig.conf
-rw-rw-rw- 1 root root 161 Jan 7 18:39 htpasswd.users
drwxr-xr-x 4 root root 4096 Oct 20 19:34 httpd
-rw-r--r-- 1 root root 1752 Jan 25 2003 identd.conf
drwxr-xr-x 2 root root 4096 Jun 17 2006 im
-rw-r--r-- 1 root root 3376 Jan 24 2003 im_palette.pal
-rw-r--r-- 1 root root 920 Jan 24 2003 im_palette-small.pal
-rw-r--r-- 1 root root 224 Jan 24 2003 im_palette-tiny.pal
-rw-r--r-- 1 root root 5464 Jan 24 2003 imrc
lrwxrwxrwx 1 root root 11 Oct 20 19:11 init.d -> rc.d/init.d
As I look at each line, (for example, the imrc line, second to the bottom), I see -rw-r--r--, meaning the owner (Root) has read/write, the group (also root) has read, and everyone else has read. The 5464 is the file size, then the creation date, then the file name.
If I wanted to change the file "imrc" to alow others in the root group to be able to change the file, as well as read it, I would do a CHMOD 664 (read/write, read/write, read) which would make it -rw-rw-r--.
I hope that explains it.
Other related commands are CHOWN (Change Owner), and CHGRP (Change Group).
(p.s., just before you ask anyway... the d in the first column means it's a directory, the l means it's a "symbolic Link", the *nix equivelant to a "shortcut" to a file in another area.)
Just my 2¢
"Life gets mighty precious when there's less of it to waste." -Bonnie Raitt "Nick of Time"
--Greg