Skip to content

Commit

Permalink
Update documentation with explanation for PTY and TTY interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
ricolxwz committed Jun 12, 2024
1 parent 8d73626 commit f383309
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/命令行/权限.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,16 @@ DAC安全模型的核心内容是: 进程理论上所拥有的权限和执行它
- 其他用户权限: `r-t` = 5
所以可以表示为7775

###### `umask`

当创建一个文件的时候, `umask`命令控制着文件的默认权限.

???+ tip "Tip"

我们可以通过`umask`命令查看默认值

Ubuntu默认的umask时`0022`, 二进制表示为`000 000 010 010`, 当我们创建文件或者目录的时候, 如果没有umask, 也就是umask为`0000`的时候, 文件或者目录的权限是`rw-rw-rw-`, 这个权限被称为原始权限, 二进制表示为`000 110 110 110`(前3个`0`为特殊权限位). 当umask为`0022`的时候, 这个时候在原始权限的基础上去掉umask为`1`上的权限, 去掉后就变成了`000 110 100 100`, 也就是`-rw-r--r--`.

##### ACL

###### ACL是什么
Expand Down Expand Up @@ -542,4 +552,5 @@ DAC安全模型的核心内容是: 进程理论上所拥有的权限和执行它
[^8]: Linux usermod命令 | 菜鸟教程. (n.d.). Retrieved June 12, 2024, from https://www.runoob.com/linux/linux-comm-usermod.html
[^9]: Linux groupadd 命令 | 菜鸟教程. (n.d.). Retrieved June 12, 2024, from https://www.runoob.com/linux/linux-comm-groupadd.html
[^10]: Linux groupdel命令 | 菜鸟教程. (n.d.). Retrieved June 12, 2024, from https://www.runoob.com/linux/linux-comm-groupdel.html
[^11]: Linux groupmod命令 | 菜鸟教程. (n.d.). Retrieved June 12, 2024, from https://www.runoob.com/linux/linux-comm-groupmod.html
[^11]: Linux groupmod命令 | 菜鸟教程. (n.d.). Retrieved June 12, 2024, from https://www.runoob.com/linux/linux-comm-groupmod.html
[^12]: Linux 权限管理. (n.d.). 知乎专栏. Retrieved June 12, 2024, from https://zhuanlan.zhihu.com/p/61196860

0 comments on commit f383309

Please sign in to comment.