Chown can change the owner and group commands of files or directories on disks to facilitate permission Control for users.
Chown
[Syntax] chown [Options] [parameters]
[Details] The chown command is used to change the owner or group of a specified file or directory. When changing the file owner or group, you can use the user name and user ID settings.
[Parameters]
Option corresponding function-c displays the result only when there is a change. Changes is similar to-c. -- Dereference: Modify the object indicated by the symbolic link without changing the symbolic connection itself. -F: no error message is displayed. -- Quiet is the same as-f. -- Silent is the same as-f. -H: only modify the file of the symbolic link. do not modify the object indicated by the symbolic link. -R processes all files in the specified directory and subdirectory. -V shows the detailed process after the command is processed. -- Help: displays help information. -- Version: displays the version information.
[Description]
Keyword Description: The owner specifies to change the owner name of a file or directory. The name of the new group to which the specified file or directory belongs. File Name.
Example
Modify the owner and group of the relevant files in conjunction with the Lnmp one-click installation package.
For example, modify the owner of all files in/home/wwwroot/TO www, and the group to which the files belong is also www.
Then:
Cd/home/wwwroot # enter the chown-R www: www * #-R directory to recursively process all files and folders. The first www is the name of the file owner, the second www is the group. # "*" Indicates all files and folders