Linux file permissions

chmod 400 (r--------)

Owner: read · Group: no access · Others: no access

400numeric
r--------symbolic
4 · 0 · 0owner · group · others
Commands
chmod 400 filename chmod u=r,g=,o= filename chmod -R 400 folder/ # apply to a folder and everything in it

Change any permission with the chmod calculator.

What chmod 400 means

WhoDigitLettersCan
Owner (user)4r--read
Group0---no access
Others0---no access

Each digit is the sum of read (4), write (2) and execute (1).

When to use 400

Read-only for the owner only (e.g. AWS .pem key files).

Related permissions

Questions

What does chmod 400 mean?

chmod 400 sets the permissions to r--------: the owner can read, the group can no access and others can no access.

When should I use 400?

Read-only for the owner only (e.g. AWS .pem key files).

What is 400 in symbolic form?

400 is r-------- (shown by ls -l as -r-------- for a file or dr-------- for a folder). The symbolic chmod command is chmod u=r,g=,o= file.