加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

权限 – 4位八进制Unix文件权限表示法的第一个数字是什么?

发布时间:2020-12-15 18:42:58 所属栏目:安全 来源:网络整理
导读:3位: 644ugo (user group other) 4位数: 0644?ugo (??? user group other) 4位八进制Unix文件权限表示法的第一个八进制数字是多少? 来自man chmod: A numeric mode is from one to four octal digits (0-7),derived by adding up the bits with values 4
3位:
644
ugo (user group other)

4位数:

0644
?ugo (??? user group other)

4位八进制Unix文件权限表示法的第一个八进制数字是多少?

来自man chmod:

A numeric mode is from one to four octal digits (0-7),derived by adding up the bits with values 4,2,and 1. Any omitted digits are assumed to be leading zeros. The first digit selects the set user ID (4) and set group ID (2) and sticky (1) attributes.

您问什么是“设置用户ID”,“设置组ID”和“粘性”?

setuid/setgid:

setuid andsetgid (short for “set user ID upon execution” and “set group ID upon execution”,respectively) are Unix access rights flags that allow users to run an executable with the permissions of the executable’s owner or group. They are often used to allow users on a computer system to run programs with temporarily elevated privileges in order to perform a specific task. While the assumed user id or group id privileges provided are not always elevated,at a minimum they are specific.

此外,当应用于目录时,setuid / setgid会导致在目录中创建的新文件分别继承父目录的uid或gid.此行为因unix的风格而异.例如,linux尊重setgid,但忽略目录上的setuid.

和sticky:

The most common use of the sticky bit today is on directories. When the sticky bit is set,only the item’s owner,the directory’s owner,or the superuser can rename or delete files. Without the sticky bit set,any user with write and execute permissions for the directory can rename or delete contained files,regardless of owner. Typically this is set on the /tmp directory to prevent ordinary users from deleting or moving other users’ files.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读