1. Modify the file user group under Linux
Chgrp:change Group, modify the user group to which the file belongs.
CHGRP Users Test.log
View Ls-l after modification
-RWXRWX--- 1 work users 0 June 8 15:46 Test.log
If you want to modify all files and directories under this directory, use the-r parameter.
Chgrp-r Users Test
The group name to be changed must be in the/etc/group file. The/etc/group file records all the group names in the system.
2. Modify the file owner under Linux
Chown:change owner's shorthand, modify the file owners.
Chown [-r] Account name file or directory
-R recursion, modify all the files in the sub-directory.
Modify the file owner Bin
Chown bin Test.log
The modified user must log the user information/etc/passwd in the/etc/passwd file.
Chown can also repair the group name
Chown Root:root Test.log
Change both the owner and group name to root.
Address: http://blog.csdn.net/yonggang7/article/details/29369587