Chmod is the right to change a file Chown is the owner and genus of the modified file Chgrp only the genus group that changed the file.
(1) chmod is the right to modify the file/directory. can have text modification and digital modification.
#chmod 777/home/berry
#chmod U+x/home/berry
Action object who is either or a combination of the following letters:
- U means "user", which is the owner of the file or directory.
- G means "same group user", that is, all users who have the same group ID as the file owner.
- O means "other (others) users".
- A means "all users". It is the system default value.
#chmod ug+w,o-x text
(2) CHGRP is a group that modifies a file or directory to which it belongs. ( just change the group of files )
#chgrp-R Guest/var/tmp/f.txt
# chgrp - R root/home/berry/file/a.txt
(3) chown modify File/directory owner and group. ( the owner and the genus of the document are changed )
#chown Guest:guest A.txt
#chown-R Guest/home/berry (change all files under the Berry file to the guest group)
Linux Commands: Modify file Permissions command chmod, CHGRP, chown differences