Skip to content

chmod 544

chmod 544 sets r-xr--r--: the owner can read and run the file but not modify it, and the group and everyone else can only read it.

Permission matrix

Which permission bits each class has
WhoRead (4)Write (2)Execute (1)Digit
Owner (u)YesNoYes5
Group (g)YesNoNo4
Others (o)YesNoNo4

Execute means different things by type. On a file it lets the kernel run it as a program. On a directory it is search permission: entering it (cd) and reaching the files inside by name. Read on a directory only lists names.

What each class can do with a file and with a directory
WhoOn a fileOn a directory
Owner (u)Read and runList, enter and open entries
Group (g)Read the contentsList names only; cannot enter or open entries
Others (o)Read the contentsList names only; cannot enter or open entries

Facts

Representations of this mode
Octal544 (0544)
Symbolicr-xr--r--
ls -l, file-r-xr--r--
ls -l, directorydr-xr--r--
Equivalent symbolic commandchmod u=rx,go=r
Default umask that creates itNone of the common umasks; set it explicitly with chmod
How Git records a file with it100755 (executable)
Special bitsNone

When to use it

  • Deployed scripts that the owning service account runs and that should be replaced by a new deploy, not edited in place.
  • It is 744 with the owner write bit removed, which is what chmod u-w on a 744 file gives you.

When not to use it

  • Directories: group and others get read without execute, so they see names but cannot open anything.
  • As secrecy: the group and others can read the file and run it through its interpreter (sh healthcheck.sh).
  • When the owner must update the file often: every edit needs a chmod first.

Commands

Set it on one file or directory
chmod 544 healthcheck.sh
chmod u=rx,go=r healthcheck.sh   # same result
Check the result
stat -c '%a %A %n' healthcheck.sh     # Linux (GNU stat): 544 -r-xr--r--
stat -f '%Lp %Sp %N' healthcheck.sh   # macOS and BSD

Applying it to a whole tree

There is no sensible recursive form of 544: directories would become listable but not enterable for group and others. Apply it to individual scripts.

Git and the execute bit

Git stores only one permission fact per file: 100755 if the owner execute bit is set, 100644 otherwise. A file with this mode is committed as 100755; the group and others bits never reach the repository. On Windows, or where core.fileMode is false, set the bit with git update-index --chmod=+x.

Frequently asked questions

What does chmod 544 mean?
Owner 5 (r-x), group 4 (r--), others 4 (r--).
Can the owner edit a 544 file?
Not directly; writes fail. The owner can run chmod u+w first.
What is the difference between 544 and 744?
Only the owner write bit. 744 lets the owner edit the script, 544 does not.

Last reviewed by Arielton Oberek.