1.chown Change the owner and group permissions for a file or directory
Format
chown [OPTION] ... [OWNER] [: [GROUP]] FILE ...
Parameters:
-R
Recursively manipulate all directories and files in the current directory;
-H
Change the ownership of the symbolic connection that is encountered, or if you do not specify this option, change the ownership of the file or directory to which the symbolic connection points, not the symbolic connection itself;
eg
Chown-hr ROOT:STAFF/AA
Change the owner of the/AA to root, group as staff
2.chmod
chmod [-CFVR] [--help] [--version] Mode file ...
U means the owner, G represents the group, and O denotes the other person, a means that all three are.
+ indicates an increase in permissions,-represents a cancellation permission, = Represents a unique set of permissions.
R is readable, w means writable, x is executable, x means only if the file is a subdirectory or the file has been set as executable
R=4,w=2,x=1
-C: If the file permissions have changed, the change action will be displayed
-F: Do not display an error message if the file permissions cannot be changed
-V: Show details of permission changes
-r: The same permissions change for all files in the current directory and subdirectories (that is, they are changed in a recursive manner)
Help: Show Auxiliary instructions
–version: Display version
eg
Chmod-r 777 AA
Ubuntu's chmod and Chown