标签:
chmod mode filename
u=owner of the file
g=owner‘s group
o=other users on the system
a=all
+:add permissions
-:remove permissions
=:clears permissions and set to mode specified
example:chmod go+w newfile
default file permissions
file -rw-r--r-- 644
directory drwxr-xr-x 755
these default settings may be changed by changing the umask value.
经典例子
场景描述:team01目录本来的权限是drw-r--r---但是一不小心设置成啦drwxrwxrwx
此时team01下有一个文件file1权限是-rw-r--r--
team02做啦如下操作
file1文件的内容被改变
标签:
原文地址:http://www.cnblogs.com/karmapeng/p/4472128.html