一、三种基本权限
1、r 读权限 ( read )
2、w 写权限 ( write )
3、x 执行权限 ( execute )

二、权限的操作 :chmod
1、第一种权限操作方式:按组名称操作

chmod 0 a.txt :清空 a.txt 文件的所有权限

chmod u+r a.txt :给a.txt设置所属用户的read权限

chmod g+w a.txt :给a.txt设置组的 write 权限

chmod 0+x a.txt :给a.txt设置其他用户的执行权限

chmod u+rwx a.txt :给所属用户设置read write execute 权限

chmod u=w a.txt :将a.txt所属用户的权限设置为write

2、第二种操作方式:按8进制算法进行操作

chmod 400 a.txt :给 a.txt 所属用户设置read权限

chmod 421 a.txt :给a.txt所属用户设置read权限,组用户设置write权限,其他用户设置execute权限

chmod 357 a.txt :分别给a.txt所属用户设置wx (2+1)权限,所有组设置rx (4+1)权限,其他用户设置rwx(4+2+1)权限
