chmod范例
来源:互联网 发布:mac自带的ppt软件 编辑:程序博客网 时间:2024/05/03 00:52
范 例:
将档案 file1.txt 设为所有人皆可读取 :
chmod ugo+r file1.txt
将档案 file1.txt 设为所有人皆可读取 :
chmod a+r file1.txt
将档案 file1.txt 与 file2.txt 设为该档案拥有者,与其所属同一个群体者可写入,但其他以外的人则不可写入 :
chmod ug+w,o-w file1.txt file2.txt
将 ex1.py 设定为只有该档案拥有者可以执行 :
chmod u+x ex1.py
将目前目录下的所有档案与子目录皆设为任何人可读取 :
chmod -R a+r *
此外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 效果相同
若用chmod 4755 filename可使此程序具有root的权限
0 0
- chmod范例
- chmod使用范例
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- chmod
- A Django setup using Nginx and Gunicorn
- Node+Mongodb环境搭建
- leetcode - 3Sum Closest
- java读取并处理excel数据
- qt 使用资源例子
- chmod范例
- IOS疯狂基础之UILabel属性
- 点击网页链接自动打开word的问题终于解决了
- su
- 微信营销策略
- Building a world
- ps
- tomcat启动时报:IOException while loading persisted sessions: java.io.EOFException的解决方案
- vsftpd.conf 详解与实例配置