格 千格 KiloCell

Chmod Calculator

Linux file permission configuration is no longer a problem. Visualized tick to read, write, execute permissions to produce octal code and chmod instantaneously Command, make sure the server is safe.

📦 Common Permission Preset
Owner (User)
User Group (Group)
Others
Digital Permissions (Octal)
755
Symbol Permissions (Symbolic)
rwxr-xr-x
Terminal command
chmod 755 [file]

In-depth understanding of Linux file permissions (Chmod)

In Linux and Unix systems, the authority management is the cornerstone of the system ' s security. Each file and directory is linked to three sets of privileges: Owner (User) 、 User Group (Group) and Others 。

🚨 scenario 1: Web directory 403 Forbidden

Reason analysis: When your Nginx or Apache is wrong about 403, usually because of a Web running user (e. g. www-data) does not have the "execution" permission to this directory. The list is not a list of the names of the people who are in the country. Execute permissions (x) means access to the directory 。 Suggested directory use 755 , file is used 644 。 This tool allows you to see directly the changes in numbers after the ticking of " execution " .

🚨 scene 2: SSH private key privileges too high to log in

Reason analysis: SSH clients require that private key documents (e.g. id rsa) be private for security reasons. If permissions set to 644 Or higher, SSH will refuse to work. The right thing to do is to use it. 600 (Read and write only for owner). The "private file" preset of this tool can help you quickly generate the command.

Secrets of digital access: 4 - 2 - 1 principles

Linux uses the sum of three binary bits to represent a group of privileges:

  • 4 (100) : Read permission (r).
  • 2 (010) : Write permission (w).
  • 1 (001) : Enforcement authority (x).

So, 7 = 4+2+1 (rwx), 5 = 4+1 (r-x), so push.

• Transport-Way Alert: Abuse of Chmod 777 is strictly prohibited

Many beginners are used customarily when they encounter problems of competence. chmod -R 777 。 It's extremely dangerous! This means that any user in the system, any malware program, can read, modify or even delete your data at will. Please always follow the principle of minimum competence. , only the permissions necessary for the program to run.