Linux文件的基本属性有9个,分别是owner/group/others组别的read/write/ excute属性
r:4、w:2、x:1
更改文件属性的命令 chmod
1)同一组(owner/group/others)的3个属性(r/w/x)是需要累加的,例如当属性为 [-rwxrwx---] 则是:
owner = rwx = 4+2+1 = 7
group = rwx = 4+2+1 = 7
others= --- = 0+0+0 = 0
如果把一个文件的所有属性都打开就要使用:
[313c@localhost]# chmod 777 filename
2)我们还可以使用字母u g o分别表示owner、group、others三个组,+ - = 表示设置符号r、w、x表示属性。
比如:chmod u=rwx,go=rx filename
chmod a-x filename 每个文件均没有执行的权限
chmod a+x filename 每个文件均有执行的权限
chmod 777 * 当前文件夹下所有文件都有 r w x 属性
其他的类似设置就ok啦
r:4、w:2、x:1
更改文件属性的命令 chmod
1)同一组(owner/group/others)的3个属性(r/w/x)是需要累加的,例如当属性为 [-rwxrwx---] 则是:
owner = rwx = 4+2+1 = 7
group = rwx = 4+2+1 = 7
others= --- = 0+0+0 = 0
如果把一个文件的所有属性都打开就要使用:
[313c@localhost]# chmod 777 filename
2)我们还可以使用字母u g o分别表示owner、group、others三个组,+ - = 表示设置符号r、w、x表示属性。
比如:chmod u=rwx,go=rx filename
chmod a-x filename 每个文件均没有执行的权限
chmod a+x filename 每个文件均有执行的权限
chmod 777 * 当前文件夹下所有文件都有 r w x 属性
其他的类似设置就ok啦