chmod 2755 — rwxr-sr-x

What chmod 2755 allows, when to use it, and the calculator pre-filled with it — toggle any box to compare.

2755
rwxr-sr-x
Owner7
rwx
Group5
r-x
Others5
r-x
Special bits2
chmod 2755 filename
chmod -R 2755 /path/to/dir

What this means

Owner can read, write, execute. Group can read, execute. Others can read, execute.

What chmod 2755 allows

WhoReadWriteExecute
Owner✓✓✓
Group✓—✓
Others✓—✓
  • • setgid (2): on a directory, new files inherit its group; on a program, it runs with the file's group.

setgid on a directory: new files inherit the directory's group instead of the creator's. Used for shared team folders.

Commands

chmod 2755 fileset it on one file or directory
chmod u=rwx,g=rxs,o=rx filethe same thing in symbolic form
chmod -R 2755 dir/recursively — careful: it applies to files and directories alike
ls -l filecheck the result: -rwxr-sr-x (a directory shows drwxr-sr-x)

On a directory, read lets you list it, write lets you create and delete entries, and execute lets you enter it and open what's inside. That's why directories usually get 755 or 750 while files get 644 or 640.

Frequently asked

What does chmod 2755 mean?

Owner: read, write, execute. Group: read, execute. Others: read, execute. setgid (2): on a directory, new files inherit its group; on a program, it runs with the file's group. In ls -l it shows as rwxr-sr-x.

What is the symbolic form of chmod 2755?

chmod u=rwx,g=rxs,o=rx file — it sets exactly the same permissions as chmod 2755.

← Chmod calculator

Common chmod permissions explained

ToolNinja