权限管理命令chmod chown chgrp numask
chmod
例如:新建文件 g.txt 用户只有读写权限,如何给它增加写的权限
前提:touch /tmp/myLinux/g.txt
进行查看:ll (ls -l)#
增加写的权限: chmod u+r /tmp/myLinux/g.txt
chmod [{ugoa} {±=} {rwx}] 文件目录
一个文件只有root和所有者可以更改。
r w x
4 2 1
读 写 执行
rwx-rw-r
用户 所有者 其他人 a all 所有人 =现在实现的权限
chmod u+r /tmp/linux4
chmod u+4 /tmp/linux4