1、文件属性
文件的属性由十个字符来表示:

第一个字符:
d:表示这个文件是一个目录;-:表示这是一个文件;l:表示是一个链接;b:表示可随机存取的装置c:表示串行接口设备,鼠标键盘等。随后的9个字母:(r代表读,w代表写,-代表可以运行)
后面对应的由属主名和属组(权限组)名。
chgrp 命令
[root@iZbp1g3zb15nr77gr5reegZ lzb]# ls
ch test
[root@iZbp1g3zb15nr77gr5reegZ lzb]# chgrp [-r] lzb test #更改对应的属组名,加上-r可以多层文件更改
chown 命令
[root@iZbp1g3zb15nr77gr5reegZ lzb]# ls -ll
total 8
drwxr-xr-x 2 root root 4096 Sep 19 17:25 ch
drwxr-xr-x 2 root root 4096 Sep 19 17:25 test
[root@iZbp1g3zb15nr77gr5reegZ lzb]# chown lzb test #修改属主
[root@iZbp1g3zb15nr77gr5reegZ lzb]# chown lzb : root test #修改属主和属组
chmod 命令
用来修改三个权限,一般用数字去修改:
r :4 w : 2 x : 1
[root@iZbp1g3zb15nr77gr5reegZ lzb]# chmod 777 test #将test修改成最高权限rwxrwxrwx
[root@iZbp1g3zb15nr77gr5reegZ lzb]# ls -ll
total 8
drwxr-xr-x 2 root root 4096 Sep 19 17:25 ch
drwxrwxrwx 2 root root 4096 Sep 19 17:25 test
[root@iZbp1g3zb15nr77gr5reegZ lzb]#