Kitloft

All tools / chmod reference

chmod 440 (r--r-----)

Read-only for the owner and group. /etc/sudoers and files in /etc/sudoers.d use this mode.

chmod 440 in symbolic form
r--r-----

Who can do what

ReadWriteExecute
Owner✓––
Group✓––
Others–––

Commands

Set the mode
chmod 440 my-file
# same thing in symbolic form:
chmod u=r,g=r,o= my-file

In ls -l output, a file with this mode shows as -r--r----- and a directory as dr--r-----.

Try a different mode

ReadWriteExecuteSpecial
Owner
Group
Others
Octal Symbolic
Command