首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >什么是S在文件许可-rwSr?

问什么是S在文件许可-rwSr?
EN

Ask Ubuntu用户
提问于 2021-09-07 09:01:47
回答 1查看 592关注 0票数 -2
  • 以八进制表达式表示的权限-rwSr–r–为4644。
  • 以八进制表达式表示的权限-rwxr-sr–为2754。

读是4,写是2,执行是1。S,S是什么,它包含多少个数字。我们是如何超越“八进制数”的?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2021-09-07 09:25:39

用户字段中的大写S表示设置了setuid位,但执行权限没有设置(这没有什么意义)。小写S意味着设置setuid位和执行权限。

至于数值,它是在man chmod中解释的所有内容。以下是节选:

代码语言:javascript
复制
A numeric mode is from one to  four  octal  digits  (0-7),  derived  by
adding up the bits with values 4, 2, and 1.  Omitted digits are assumed
to be leading zeros.  The first digit selects the set user ID  (4)  and
set group ID (2) and restricted deletion or sticky (1) attributes.  The
second digit selects permissions for the user who owns the  file:  read
(4),  write  (2),  and  execute  (1); the third selects permissions for
other users in the file's group, with the same values; and  the  fourth
for other users not in the file's group, with the same values.
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1362343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档