Permissions

After typing ls -l, you'll get a list of all files & directories, along with other information, including permissions associated with those files & directories. These permissions might look like any one of the following:

-rw-rw-r--
lrwxrwxrwx
-rwxr-xr-x

These permissions can be divided up as follows:

position 1 = type of object
positions 2-4 = permissions for owner
positions 5-7 = permissions for group
positions 8-10 = permissions for world

Possible types for position 1:
d = directory
- = file
l = link to another file or object (like a Windows shortcut)
s = socket
= = pipe
b = block device (eg, a disk drive that handles data a block at a time)
c = character device (eg, serial or parallet ports that handle data on byte, or character, at a time)

Positions 2, 3, & 4 tell us if the owner has read, write, & execute permissions for the file or object.

2 r read
3 w write (create, modify, delete)
4 x execute (run)

A - in any position indicates that the user does NOT have permission to read, or write, or execute.

Positions 2-4 correspond to positions 5-7 and 8-10 for the group and the world, respectively.

In other words, permissions can be read as follows:

<object type><owner read><owner write><owner execute><group read><group write><group execute><world read><world write><world execute>

WebSanity Top Secret