1.chmod (Rights Management) [[email protected] tem]# chmod-r 777/tem/a/b recursive change of permissions;
Permission number method owner, root to change permissions;
R----4
W---2
X---1
2.chown change the file or owner;
[email protected] tem]# Touch Fengjie
[Email protected] tem]# ls-l Fengjie
-rw-r--r--. 1 root root 0 April 11:42 Fengjie
[Email protected] tem]# Useradd Shenchao
[Email protected] tem]#
[Email protected] tem]# chown Shenchao Fengjie
[Email protected] tem]# ls-l Fengjie
-rw-r--r--. 1 shenchao Root 0 April 11:42 Fengjie
3.CHGRP (change the group to which the file belongs)
[Email protected] tem]# Groupadd Lampbrother
[Email protected] tem]# chgrp lampbrother Fengjie
[Email protected] tem]# ls-l Fengjie
-rw-r--r--. 1 Shenchao lampbrother 0 April 11:42 Fengjie
[Email protected] tem]#
[Email protected] tem]# chmod g+w Fengjie
[Email protected] tem]# ls-l Fengjie
-rw-rw-r--. 1 Shenchao lampbrother 0 April 11:42 Fengjie
4.umask-s display, set the default permissions of the file;
[Email protected] tem]# mkdir test1
[Email protected] tem]# ls-l test1
Total dosage 0
[Email protected] tem]# ls-ld test1
DRWXR-XR--. 2 root root 6 April 11:58 test1
[[Email protected] tem]# (change to a unified desired permission)
Linux Fundamentals and Applications tutorial 003 (Simple basics of Rights management commands)