Owner: read, write, execute · Group: read, execute · Others: read, execute
Change any permission with the chmod calculator.
| Who | Digit | Letters | Can |
|---|---|---|---|
| Owner (user) | 7 | rwx | read, write, execute |
| Group | 5 | r-s | read, execute |
| Others | 5 | r-x | read, execute |
Each digit is the sum of read (4), write (2) and execute (1). The leading 2 is a special bit: setgid — programs run with the file’s group, and new files in a folder inherit the folder’s group.
Folders where new files should inherit the folder’s group (setgid).
chmod 2755 sets the permissions to rwxr-sr-x: the owner can read, write, execute, the group can read, execute and others can read, execute. The leading digit sets special bits (setgid).
Folders where new files should inherit the folder’s group (setgid).
2755 is rwxr-sr-x (shown by ls -l as -rwxr-sr-x for a file or drwxr-sr-x for a folder). The symbolic chmod command is chmod u=rwx,g=rx,o=rx file.