Chmod 400 Linux Permissions (r--------)

chmod 400 sets permissions to r--------: Owner: Read only (4), Group: No access (0), Others: No access (0). File is protected against accidental modifications by anyone, including the owner. Read access is exclusive to owner.

Owner (User) 4 (r--)

Read only

Group 0 (---)

No access

Others (Public) 0 (---)

No access

Bash Command Example

Security Notice

Recommended for cloud certificates (.pem files), SSL private certs, and immutable read-only keys.

Open the full tool: Full Chmod Calculator →

Linux Permissions Breakdown

Octal Symbolic Purpose
755 rwxr-xr-x Standard for directories and scripts
644 rw-r--r-- Standard for regular files
777 rwxrwxrwx Full permissions for everyone (insecure)
700 rwx------ Private owner directory
600 rw------- Private secret file
666 rw-rw-rw- Read and write for all
400 r-------- Read-only for owner

FAQ

How do I set permissions to 400 in Linux?

Run the command: chmod 400 <filename>. For directories and their contents recursively, run: chmod -R 400 <directory>.

Is chmod 400 secure?

Recommended for cloud certificates (.pem files), SSL private certs, and immutable read-only keys.

What does the symbolic code r-------- represent?

The 9 characters represent 3 triplets: Owner (r--), Group (---), and Others (---). 'r' is read (4), 'w' is write (2), 'x' is execute (1), and '-' is disabled (0).

🔗 Share this page

TelegramWhatsAppX