If you've ever pasted chmod 755 script.sh into a terminal because a Stack Overflow answer told you to, without knowing what 755 actually sets, you're not alone. The numbers aren't arbitrary -- they're a compact encoding of a permission system that's been part of Unix since the 1970s, and once it clicks, you'll never need to look it up again.
Three permission types, three groups
Every file and directory has three kinds of permission: read (r), write (w), and execute (x). And those permissions are set separately for three groups of people: the file's owner, the group it belongs to, and everyone else ("other" or "world").
That's it -- three permissions times three groups, which is why permission strings like rwxr-xr-x are always nine characters long: three for the owner, three for the group, three for everyone else.
Where the numbers come from
Each permission type has a fixed numeric value: read is 4, write is 2, execute is 1. You add them up to get one digit per group:
rwx= 4+2+1 = 7 (read, write, and execute)rw-= 4+2 = 6 (read and write, no execute)r-x= 4+1 = 5 (read and execute, no write)r--= 4 (read only)
So chmod 755 breaks down as owner=7 (rwx), group=5 (r-x), other=5 (r-x). The owner can read, write, and execute the file; everyone else can read and execute it but not modify it. That's the standard permission set for a script or executable you want other users to be able to run but not edit.
chmod 644 is owner=6 (rw-), group=4 (r--), other=4 (r--) -- the default for a regular file like a config or a text document. The owner can edit it, nobody else can.
chmod 777 gives everyone full read, write, and execute access. It's occasionally useful for genuinely shared, low-stakes scratch files, but setting it on anything reachable from the internet -- a web-accessible script, an upload directory -- means any user on the system, or any process that can write to that path, can modify or replace it. It shows up constantly as the lazy fix for a "permission denied" error, and just as constantly as the root cause of a compromised server later.
Execute means something different for directories
On a directory, the execute bit doesn't mean "run it" -- it means "you're allowed to enter it and access files inside by name," which is why directories almost always need the execute bit set even when they don't need to be "run." This trips people up when they set a directory to 644 (no execute) and then can't cd into it or list files inside, even though ls -l from outside still shows the directory itself.
Symbolic notation is the same information, spelled out
chmod also accepts symbolic form: chmod u+x file adds execute for the user (owner), chmod go-w file removes write for group and other. This is handy for changing one bit without recalculating the whole octal number, but it describes the exact same nine-permission grid underneath -- there's no extra information in one format that isn't in the other.
Converting between the two
Most of the friction here isn't the concept -- it's doing the arithmetic (or the reverse: reading rwxr-xr-x back into 755) correctly and quickly, especially with less common combinations. The Chmod Calculator converts freely between checkboxes, octal notation, and symbolic notation, so you can set the permissions you want visually and get the exact chmod command to run.