名字
chmod
命令格式
符号模式:chomd [who] operator [permission] filename
绝对模式:chmod [mode] file
who的含义:
u: 文件属主
g: 同组用户
o: 其他用户权限
a: 所有用户(文件属主、同组用户及其他用户)
operator的含义:
+: 增加权限
-: 取消权限
=: 设定权限
permission的含义:
r(4): 读权限
w(2): 写权限
x(1): 执行权限
s: 文件属主和线set-ID
t: 粘性位*
l: 给文件加锁,使其他用户无法访问
符号模式示例:
chmod a-x myfile
chmod og-w myfile
chmod g+w myfile
chomd u+x myfile
chmod go+x myfile
绝对模式示例:
chmod 666 myfile
chmod 644 * -- 一次设置目录下所有文件权限: 属主读写,组用户和其他用户读
chmod
命令格式
符号模式:chomd [who] operator [permission] filename
绝对模式:chmod [mode] file
who的含义:
u: 文件属主
g: 同组用户
o: 其他用户权限
a: 所有用户(文件属主、同组用户及其他用户)
operator的含义:
+: 增加权限
-: 取消权限
=: 设定权限
permission的含义:
r(4): 读权限
w(2): 写权限
x(1): 执行权限
s: 文件属主和线set-ID
t: 粘性位*
l: 给文件加锁,使其他用户无法访问
符号模式示例:
chmod a-x myfile
chmod og-w myfile
chmod g+w myfile
chomd u+x myfile
chmod go+x myfile
绝对模式示例:
chmod 666 myfile
chmod 644 * -- 一次设置目录下所有文件权限: 属主读写,组用户和其他用户读