About this tool
Chmod Calculator converts between the checkbox view of Unix file permissions and the numeric (octal) code used by the chmod command. The grid has three columns, owner, group and other, with three boxes in each: read, write and execute. Every box you tick adds its value (read 4, write 2, execute 1) to that column's digit, so read, write and execute for the owner and read and execute for group and other gives 755. The octal code and the symbolic string, here rwxr-xr-x, update at once.
It works the other way too. Type a code into the octal box and the checkboxes and symbolic string follow. The box takes three digits from 0 to 7, and a four-digit code such as 0755 is also accepted, but its first digit, which holds the setuid, setgid and sticky bits, is ignored. Anything else, such as 888, 75 or letters, shows an invalid message. Special bits are not modelled, so 4755 displays the same as 755, and symbolic input such as u+x or g-w is not supported; the symbolic string is output only.
Use the code as chmod 755 script.sh. Common values are 644 (owner reads and writes, everyone else reads, typical for files), 755 (typical for scripts and directories), 600 (private to the owner) and 777, which lets everyone write and is rarely a good idea. The tool only calculates numbers; it does not change real permissions or read what a path currently has, which ls -l shows.