笔试题&linux:修改权限chomd

参考:CSDN1CSDN2

数字与权限对应关系

r=4,w=2,x=1
若要rwx(可读、可写、可执行)属性,则4+2+1=7
若要rw-(可读、可写、不可执行)属性,则4+2=6
若要r-w(可读、不可写、可执行)属性,则4+1=5
示例:

chmod a=rwx file 和 chmod 777 file 效果相同
chmod ug=rwx,o=x file 和 chmod 771 file 效果相同
若用chmod 4755 filename可使此程式具有root的权限

权限详细信息示意图

在Linux中输入ll,会出现指定目录下文件/目录的详细信息,如:-rw–wx—x、d–xr-xrw-
在这里插入图片描述

发布了21 篇原创文章 · 获赞 15 · 访问量 4978

猜你喜欢

转载自blog.csdn.net/zdluffy/article/details/99679501
今日推荐