Convert symbolic permission strings like rwxr-xr-- into octal chmod values.
Symbolic permissions (the rwxrwxrwx string from ls -l) map directly to octal: each triplet (owner, group, others) converts by summing r=4, w=2, x=1. Special bits (SUID=4, SGID=2, sticky=1) form an optional leading digit. This calculator converts the human-readable ls -l output to the numeric form needed for chmod commands.
Triplet to octal
octal_digit = (r?4:0) + (w?2:0) + (x?1:0)
Lowercase 's' in the owner's execute position means SUID is set AND execute is set. In the group position it means SGID+execute. Uppercase 'S' means the special bit is set but execute is NOT — which is usually a mistake.
The sticky bit ('t' when execute is also set, 'T' without execute) on a directory means only the file owner, directory owner, or root can delete files within it — the classic example being /tmp with permissions 1777.