chmod 500 — what r-x------ means

500 r-x------

Owner can read and execute only; no write for the owner, and nothing for group or others.

Note: this grants group or shared write access — fine for team directories, but make sure that is what you intend.

Permission breakdown

When to use 500

Common mistakes & gotchas

500 vs the alternatives

Set it with chmod

Apply this permission to a single file:

chmod 500 filename

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

chmod -R 500 directory/

The same thing in symbolic form:

chmod u=rx,g=,o= filename

Frequently asked questions

What does chmod 500 mean?

500 sets r-x------: the owner gets read and execute, while group and others get no permissions at all. There's no write bit even for the owner, so the file is private, runnable, and read-only.

How do I edit a file that's set to 500?

Restore the owner's write bit first: chmod u+w file, make your changes, then re-lock with chmod 500 file. Alternatively edit as root, which bypasses the permission bits.

What's the difference between 500 and 700?

The owner's write bit. 700 is rwx------ (owner can read, write, execute); 500 is r-x------ (owner can read and execute but not write). Use 700 while maintaining the script, 500 to make it tamper-resistant.

Should I use 500 or 400 for a private file?

Use 500 for something you need to execute, like a private script — it includes the execute bit. Use 400 for a file you only read, like an SSH private key or a secrets file, where execute makes no sense and read-only is the goal.

Other common permissions

Or build any permission with the interactive chmod calculator.