读书人

Free BSD 设立文件和目录权限

发布时间: 2012-10-09 10:21:45 作者: rapoo

Free BSD 设置文件和目录权限
此外chmod也可以用数字来表示权限如 chmod 777 file
语法为:chmod abc file

其中a,b,c各为一个数字,分别表示User、Group、及Other的权限。

r=4,w=2,x=1
若要rwx属性则4+2+1=7;
若要rw-属性则4+2=6;
若要r-x属性则4+1=7。

范例:
chmod a=rwx file


chmod 777 file

效果相同
chmod ug=rwx,o=x file


chmod 771 file

效果相同

读书人网 >操作系统

热点推荐