↑↓ move Enter open Esc close

chmod 755 in Linux: What It Means and When to Use It

Understand what chmod 755 means and when it is appropriate.

The mode 755 is built from 4=read, 2=write and 1=execute for owner, group and others.

Step by step

1 Set the mode

$ chmod 755 script.sh

Sets the file to rwxr-xr-x.

2 Verify it

$ ls -l script.sh

Look for `-rwxr-xr-x`.

3 Use it on a directory

$ chmod 755 myapp/

Directory execute permission allows traversal.

4 Make a smaller change

$ chmod u+x script.sh

Adds execute for the owner without replacing all other bits.

Tips worth knowing

Frequently asked questions

What does chmod 755 mean?

Owner has read/write/execute; group and others have read/execute.

What is the difference between chmod +x and chmod 755?

+x adds execute permission while 755 sets the complete mode.

If it goes wrong

The commands behind it

Concepts involved: File permissions

More how-to guides