Enter ls-lxxxxxx (xxxxxx is the file name) in the terminal to view the permission. similar information appears, mainly including-rw-r -- where: the first-represents the three rw in the middle of the type-represents the owner (us
View permissions
Enter at the terminal:
Ls-l xxx. xxx (xxx. xxx is the file name)
Then similar information will appear, mainly including:
-Rw-r --
Among them: the first one represents the three rw in the middle of the type-represents the owner (user), and the three rw-represents the group) the last three r groups represent other people (other). then I will explain the nine digits that follow: r indicates that the file can be read) w indicates that the file can be written (write) x indicates that the file can be executed (if it is a program)-indicates that the corresponding permissions have not been granted
Modify permissions
Enter at the terminal:
Chmod o + w xxx. xxx
Grant other users the permission to write the file xxx. xxx.
Chmod go-rw xxx. xxx
Deletes the read and write permissions of group groups and other persons in xxx. xxx.
U stands for the owner (user)
G indicates the group in which the owner is located)
O stands for others, but not u and g (other)
A represents all people, including u, g, and o
R indicates that the file can be read)
W indicates that the file can be written)
X indicates that the file can be executed (if it is a program)
Digit substitution
Rwx can also be replaced by numbers.
R ------------ 4
W ----------- 2
X ------------ 1
------------- 0
Action:
+ Indicates adding permissions.
-Indicates the permission to be deleted.
= Indicates that it is the only permission
-Rw ------- (600) only the owner has the read and write permissions.
-Rw-r -- (644) only the owner has the read and write permissions. the group and others have only the READ permissions.
-Rwx ------ (700) only the owner has the read, write, and execute permissions.
-Rwxr-xr-x (755) only the owner has the read, write, and execute permissions. the group and others have only the read and execute permissions.
-Rwx -- x (711) only the owner has the read, write, and execute permissions. the group and others have only the execution permissions.
-Rw-(666) everyone has the read and write permissions.
-Rwxrwxrwx (777) everyone has the permission to read and write and execute