Basic
d = directory
$-$ = regular file
l = symbolic link
s = Unix domain socket
p = named pipe
c = character device file
b = block device file
r = read permission
w = write permission
x = execute permission
$-$ = no permission
Which user?
u user/owner
g group
o other
a all
What to do?
$+$ add this permission
$-$ remove this permission
$=$ set exactly this permission
Which permissions?
r read
w write
x execute
4 = read (r)
2 = write (w)
1 = execute (x)
0 = no permission (-)
Which number?
0 —
1 –x
2 -w-
3 -wx
4 r–
5 r-x
6 rw-
7 rwx
Reference
http://www.cnblogs.com/computer/archive/2010/07/20/1781091.html