Linux file owner and owner group Change file properties 1, chgrp: Change file group
Grammar:
[-R] belongs to group name file name
Parameter options
- -R: Recursively change the group of files, that is, when you change the genus of a directory file, if you add the-r parameter, the group of all files under that directory will change.
2, Chown: Change the owner of the file, you can also change the file group
Grammar:
Chown [-R] is the main name file Name
Chown [-R] belongs to the main name: The name of the group name
3, chmod: Change the file 9 properties
There are two ways to set up Linux file attributes, one is a number and one is a symbol. Linux files have the basic permissions of nine, respectively, owner/group/others three identities each have their own Read/write/execute permissions.
[-R]r:4 w:2 x:1
Symbol Type Change file permissions
There is also a way to change the permissions yo! From the previous introduction, we can find that basically nine permissions are (1) User (2) group (3) Others three kinds of identities! Then we can represent three kinds of identities by u, G, O!
In addition, a represents all and all identity! Then the permission to read and write can be written as R, W, x! That is, you can see it in the following way:
| chmod |
U G O A |
+ (Join) -(remove) = (set) |
R W X |
File or directory |
If we need to set the file permissions to-rwxr-xr--, you can use the chmod u=rwx,g=rx,o=r file name to set:
15, Linux file Basic Properties Chgrp,chown,chmod