In Linux, numbers indicate the file operation permissions (777,755 ,..)
In Linux, When you view the detailed attribute list of all files in a path (LS-l), you will see the operation permission of the file, similar to the string of "drwxr-XR-X.
This string can be divided into four sections. The structure is "D + file owner operation permission + file owner group Operation permission + other people's operation permission ":
1. Section 1: the letter "D" in the example indicates the directory where the file is located.
2. Section 2: the string "rwx" in the example indicates the operation permission of the file owner.
3. In the third section, the string "R-X" in the example indicates the operation permissions of the file owner's group on some files.
4, section 4. the string "R-X" in the example indicates the operation permission of anyone except 2 and 3 for this file.
Generally, three numbers are used to indicate the ACL for reading, writing, and executing a file:
Run: 1
Write: 2
Read: 4
Write a number: 755. The three digits correspond to the preceding segments: 7 corresponds to the second segment, 5 corresponds to the third segment, and 5 corresponds to the fourth segment.
Meaning:
7: indicates the permission of the file owner. The value 4 + 2 + 1 = 7 indicates that the file owner has the power to kill the file and read, write, and execute the file at will.
5: indicates the permission of the group in which the file owner is located: 4 + 1 = 5. That is, the group in which the file owner is located has the read and execution permissions on the file and has no write permissions.
5: Same as above. Others have only read and execute permissions on the file and have no write permission.