Ok, this is not nearly as difficult as people make it out to be. First, you have three entities that permissions apply to: Owner, Group, and Other (or World). Next, you have 3 available permissions: Read, write, and execute.
When you do ls -al you will see something like: drwxrwxr-x
First digit is a “d” meaning it is a directory. If it were a normal file it would be “-” instead of “d”.
Next, there are 9 positions where you see either a letter or a hyphen (-). The first 3 positions apply to the “Owner” of the file (whoever created it). The next 3 characters apply to the “Group” that the file belongs to (The Primary Group of whoever created it), and the last 3 apply to the World (anyone else).
r = read
w = write
x = execute
Now, let’s break this down into octal because it is much easier to read quickly than a jumble of letters. All you need to know for octal is:
Read = 4
Write = 2
Execute = 1
Add up the value of the 3 digits from the owner and you get a number, in the above case: 7
In octal format a single digit represents the 3 letters from before. For example: 775 represent rwx|rwx|r-x
Get it? So…
755 = rwxr-xr-x
644 = rw-r–r–
775 = rwxrwxr-x
777 = rwxrwxrwx (very bad to give the world full control over your files)
700 = rwx——