chmod 555 — what r-xr-xr-x means

555 r-xr-xr-x

Everyone can read and execute; nobody can write.

Permission breakdown

When to use 555

Common mistakes & gotchas

555 vs the alternatives

Set it with chmod

Apply this permission to a single file:

chmod 555 filename

Or apply it recursively to a directory and everything inside it:

chmod -R 555 directory/

The same thing in symbolic form:

chmod u=rx,g=rx,o=rx filename

Frequently asked questions

What does chmod 555 mean?

chmod 555 sets permissions to r-xr-xr-x: the owner, group, and everyone else can read and execute, but no one can write. It makes a file or directory read-only while keeping it runnable or traversable.

Why use 555 instead of 444 for a directory?

A directory needs the execute (x) bit to be entered and traversed. 444 has no x, so you could not cd into it or reach the files inside. 555 keeps the directory navigable while still forbidding writes.

Can the owner still edit a 555 file?

Not directly — 555 removes write for the owner too. The owner must first restore write with chmod u+w (or chmod 755), make the change, then optionally set it back to 555.

Is chmod 555 safe?

Yes for public directories and executables that should be runnable but not modified. Avoid it for files containing secrets, since 555 is world-readable and any user can read the contents.

Other common permissions

Or build any permission with the interactive chmod calculator.