Linux User and permissions detailed
Rights Management
Chown chgrp chmod umask
################################################
Chown: Modify Owner
-R: Modify the directory and its internal genera group
--reference
Chown username:grpname file simultaneously modifies the genus Master Group
[Email protected] ~]# chown jameszhan:root/tmp/tmp.txt
################################################
Chgrp: Modifying the genus Group
-R: Recursive modification of the genus Group
--reference
################################################
chmod: Modify permissions for other groups belonging to the main group
Three types of users
U
G
O
Three types of permissions
R
W
X
chmod +rwx
RWX: Read and write execution
---: No permissions
[Email protected] t]# ll/tmp/
Total Dosage 40
-rw-r--r--. 1 root root 0 November 19:28 1btest2
Copy Permissions
Chown--reference=/tmp/abc/tmp/test
[Email protected] ~]# ll/tmp/
Total Dosage 40
-rw-r--r--. 1 jameszhan Root 0 November 19:28 1btest2
-rw-r--r--. 1 root root 0 November 19:32 23btest2
[Email protected] ~]# chown--reference=/tmp/1btest2/tmp/23btest2
[Email protected] ~]# ll/tmp/
Total Dosage 40
-rw-r--r--. 1 jameszhan Root 0 November 19:28 1btest2
-rw-r--r--. 1 jameszhan Root 0 November 19:32 23btest2
################################################
Umask
Directory default Permissions 666
File default Permissions 777
Admin default umask=002
General user Default umask=022
[Email protected] ~]# umask
0022
################################################
This article is from the "James Zhan Linux Advanced ops" blog, so be sure to keep this source http://jameszhan.blog.51cto.com/10980469/1875162
Linux Fundamentals-10, Rights Management Chown CHGRP chmod umask