A quick primer on the basics of the permission number.
There are three digits. To take the example of 754 (just at random), 7 is owner, 5 is group, 4 is anyone.
Each digit is really a set of three bits (for execute, write, and read). But to visualize them, you can think of each permission as a number to be added:
+1: Execute
+2: Write
+4: Read
At the base, you have zero (no permissions). If you want to let somebody read a file, you would add 4. If you want to let them read and write a file, you would add 2 and 4 (6). If you want to let them read, write, and execute a file, you would add 1 and 2 and 4 (7).
Any combination of the three is possible. The most common you'll see are probably 7 (full permissions), 6 (read/write), 5 (read/execute), and 4 (read).
So, if you have the permission of 755, it would mean:
owner: full permission
group: read/execute
anyone: read/execute
When you do an 'ls -l', you'll see a representation of the bitfield. 777 looks like:
-rwxrwxrwx
The first digit is the file type (d for directory, for example). The next nine are broken up into groups of three:
- rwx rwx rwx
That's the owner/group/anyone again. 755 would look like:
-rwxr-xr-x
There is also a different syntax ("+x" gives all three execute permissions, "go+r" gives group and owner read permissions, etc) if you don't want to use the numbers, but I'll let you read about that yourself (google it, or perhaps something like
http://www.zzee.com/solutions/chmod-help.shtml).