liunx-系统配置及服务管理 用户的权限-基本权限UGO

1.权限对象:属主:u ; 属组: g : 其他人: o ;所有人:a(u
+g+o)
2.权限类型 :读: r=4 ; 写: w=2 ; 执行: x=1
3.查看权限记录

   [root@localhost ~]#ls  -l  /root/1.txt
   -rw-r--r--.   1   root root  179  5月  25  14:27  /root/1.txt
    -文件类型
     rw-主人的权限,属主
       r--属组的权限,
       r--其他人的权限

. 权限的扩展
1文件链接(第七章文件链接)
root文件的属主
root文件的属组
179大小
5月 25 14:27文件最后的修改时间
/root/1.txt 文件的名和路径
4.语法: 使用符号:u用户 g组 o其他 r读 w写 x执行
语法: chmod 对象(u/g/o/a)赋值符(+/-/=)权限类型(r/w/x) 文 件/目录

5 [root@localhost ~]# touch 123.txt
[root@localhost tmp]# ll 123.txt
-rw-r--r--. 1 root root 0 4月 13 20:49 file1
权限 属主 属组 文件
6.[root@localhost tmp]#vim 123.txt
echo "hello 2020"
read -p "请输入您的姓名:" name
echo "哈哈 $name 是大笨蛋"liunx-系统配置及服务管理  用户的权限-基本权限UGO
可查看,可编写 不可执行liunx-系统配置及服务管理  用户的权限-基本权限UGO
7.使用数字; 4读 2写 1执行 chmod 改写文件权限; chmod 744 123.txt root账户已能执行程序
liunx-系统配置及服务管理  用户的权限-基本权限UGO
程序已可以执行:liunx-系统配置及服务管理  用户的权限-基本权限UGO

猜你喜欢

转载自blog.51cto.com/14881339/2513872