Modify file permission records in Linux
1. There are three types of files,
Use ls-l to query. Files starting with "1", directories starting with "d" (commonly known as folders), and connections starting with the letter "l.
2. The remaining nine are three in one group, each of which has four types of symbols: "r", "w", "x", and "-".
R (read): indicates the read permission.
W (write): indicates the write permission.
X (execuite): indicates the execution permission.
-: Indicates that you do not have this permission.
3. The first group indicates the permissions of the owner of the file.
The second group represents the permissions assigned to the file by the owner of the file in the same group.
The third group indicates the permissions that other people except the group have on the file.
4. Modify permissions
You can use the command chmod to grant permissions to files.
Normal correction:
Chmod + x "file name": grant permissions to all users (that is, the owner, the same group member, and persons outside the group ). Chmod u + x "file name": grant permissions to yourself. u indicates that the user is the user. Chmod g + x "file name": grant permissions to yourself. g: indicates that grup is the same group of people. Chmod o + x "file name": grant permissions to yourself. o: indicates that other is another person. |
Professional Reform
Chome 755 file name
Reason: the permission to be modified is represented by three octal rules.
For example, the format-rwx r-x --- can be expressed as 0 or 1. If-is displayed above, it is expressed as 0, if it is 1, it indicates that you have the corresponding read/write permission.
Binary |
Octal |
111 (rwx) |
7 |
110 (rw -) |
6 |
101 (r-x) |
5 |
100 (r --) |
4 |
011 (-wx) |
3 |
010 (-w -) |
2 |
001 (-- x)
|
1 |
000 (----) |
0
|
Welcome to my personal website