CHMOD


Number Style
chmod xxxx file
Position
Use
Possible Values
Applies to
First X

4 = set uid (user id)
2 = set gid (group id)
1 = save text image
0 = you can just leave it out if the you want and chmod assumes that you mean 0xxx
Everyone
Second X

4 = read
2 = write
1 = execute
0 = no permissions
The files owner the person who owns this file
Third X

4 = read
2 = write
1 = execute
0 = no permissions
The files group
Fourth X

4 = read
2 = write
1 = execute
0 = no permissions
The other group (i.e) People without explicit permissions

Usage
Add the possible values together to get the combination of permissions you want you can leave stuff out and just use something like chmod 67 and chmod assumes it's chmod 0067... (leading zeros)

Letter Style

Each MODE is one or more of the letters ugoa, one of the symbols +-= and
one or more of the letters rwxXstugo

u = user who owns file
g = group who has permissions to file
o = others without explicit permissions to file
a = all u, g & o

+
-
=

r = read
w = write
x = execute
X
s = set user id on execution
t =
u
g
o