1 . Command format:
chown [Options] ... Owner [: [Group]] file ...
2 . Command function:
Change the file owner and group by Chown. You can use the user name and user identification number settings when you change the owner or group of the file. Ordinary users cannot change their files to other owners. Its operation permissions are generally administrator
3. Command parameters:
Necessary parameters:
-C Displays information about the changed parts
-F Ignore Error messages
-H Fix Symbolic link
-R handles all files in the specified directory and its subdirectories
-V displays detailed processing information
-deference acts on the point of a symbolic link, not the linked file itself
Example 1: Changing Owners and groups
[Email protected] home]# chown svn:svn test.log
[email protected] home]# LL
-rw-r--r--. 1 SVN svn 0 May 5 03:02 test.log
Example 2: Changing file owners and groups
[Email protected] home]# chown Root:test.log
[email protected] home]# LL
-rw-r--r--. 1 root root 0 May 5 03:02 test.log
Example 3: Changing file groups
[Email protected] home]# CHOWN:SVN Test.log
[email protected] home]# LL
-rw-r--r--. 1 root svn 0 May 5 03:02 test.log
Example 4: Changing the owner and group of all files in the specified directory and its subdirectories
Chown–r svn:root Test
Linux command (+): Chown command