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
A private script only the owner runs. Removing write even from the owner guards against accidental edits or tampering — you must chmod +w deliberately before changing it.
Set it with chmod
Apply this permission to a file:
chmod 500 filename
Or apply it recursively to a directory and everything inside it:
chmod -R 500 directory/
Other common permissions
Or build any permission with the interactive chmod calculator.