Owner: read, write, execute · Group: read, execute · Others: read, execute
Change any permission with the chmod calculator.
| Who | Digit | Letters | Can |
|---|---|---|---|
| Owner (user) | 7 | rws | read, write, execute |
| Group | 5 | r-x | read, execute |
| Others | 5 | r-x | read, execute |
Each digit is the sum of read (4), write (2) and execute (1). The leading 4 is a special bit: setuid — the program runs with the privileges of the file’s owner.
Programs that must run with their owner’s privileges (setuid), such as passwd.
chmod 4755 sets the permissions to rwsr-xr-x: the owner can read, write, execute, the group can read, execute and others can read, execute. The leading digit sets special bits (setuid).
Programs that must run with their owner’s privileges (setuid), such as passwd.
4755 is rwsr-xr-x (shown by ls -l as -rwsr-xr-x for a file or drwsr-xr-x for a folder). The symbolic chmod command is chmod u=rwx,g=rx,o=rx file.