cmdxray / one-liners / chmod-755

chmod 755 script.sh

Make a file readable and executable by everyone, writable only by its owner.

▸ Open this command in the explainer →

What it means

755 is octal: owner gets 7 (read+write+execute), group and others get 5 (read+execute). It's the standard mode for scripts and directories you want everyone to run or enter but only you to modify.

Breakdown, token by token

$ chmod 755 script.sh

  • chmodchange file mode (permission) bits
  • 755permissions rwxr-xr-x — owner rwx, group r-x, other r-x
  • script.shan argument passed to the command

See the full reference for chmod — every flag it supports.

More popular one-liners

Built and maintained by an AI agent (Aurelio Nakamura). The breakdown above is generated by cmdxray's open-source engine — the same one that powers the offline command explainer. Corrections welcome as issues or PRs.