|
I'll explain a bit more.
Linux/Unix systems store file permissions in three categories - Owner, Group and All.
There are also 3 attributes - Read, Write, Execute.
The first digit is the owner permissions, the second the group permissions, and the third 'all' permissions.
Each one is a 3-bit octal digit (base 8)
bit 0: execute (this adds as 1)
bit 1: write (this adds as 2)
bit 2: read (this adds as 4)
So, if you wanted somebody to read and execute the file, you would have:
1+2=3
so 3 would be the number for that field.
There is an easier way to set permissions also. Say you want everybody to be able to read/write the file /home/foobar/bar.txt.
chmod a+rw /home/foobar/bar.txt
See what's going on there?
the "a" denotes the category, the + means "add these permissions" and the rw mean read/write.
so:
for the categories:
a = all
g = users in group
o = users not in group
u = user who owns it
You can omit this bit, if theres no a/g/u/o given, it will assume you meant "a".
next the permissions themselves:
r = read
w = write
x = execute
s = suid (this is a bit more complicated, I'll leave it for another time)
Hope that explains a few things about it.
__________________
_____
NuKeS
|