All,
You windows users just do not understand file permission the look like this:
Code:
drwxrwxr-x 2 ndavis ndavis 4096 2008-11-20 08:22 .
drwxr-xr-x 7 root root 4096 2008-12-02 12:55 ..
-rw------- 1 ndavis ndavis 666 2008-12-11 14:51 .bash_history
-rw-r--r-- 1 ndavis ndavis 220 2008-11-19 12:05 .bash_logout
-rw-r--r-- 1 ndavis ndavis 2298 2008-11-19 12:05 .bashrc
-rw-r--r-- 1 ndavis ndavis 566 2008-11-19 12:05 .profile
-rw-r--r-- 1 ndavis ndavis 0 2008-11-20 08:22 .sudo_as_admin_successful
Columns are explained like this:
1. 'd' denote a directory, '-' denotes a file,
2. 'r' is read for owner,
3. 'w' is write for owner,
4. 'x' is execute for owner,
5. 'r' is read for group,
6. 'w' is write for group,
7. 'x' is execute for group,
8. 'r' is read for public or anonymous user,
9. 'w' is write for public or anonymous user,
10. 'x' is execute for public or anonymous user.
the chmod command is:
chmod ugp file
where:
u ==> binary for owner,
g ==> binary for group,
p ==> binary for public,
binary equiv:
Quote:
400 -r-------- read by owner
040 ----r----- read by group
004 -------r-- read by anybody (other)
200 --w------- write by owner
020 -----w---- write by group
002 --------w- write by anybody
100 ---x------ execute by owner
010 ------x--- execute by group
001 ---------x execute by anybody
4000 s--------- suid
2000 s--------- sgid
1000 t--------- sticky
you add the binary values to set combinations:
so chmod 775 equals rwx for owner, rwx for group rx for public
so chmod 444 equals r for owner, r for group r for public
so chmod 664 equals rw for owner, rw for group r for public
so chmod 665 equals rw for owner, rw for group rx for public
Hope you get it now, and yes this is why Linux/Unix is much more secure that Windows.
OMR