-rwSr–r–为4644。-rwxr-sr–为2754。读是4,写是2,执行是1。S,S是什么,它包含多少个数字。我们是如何超越“八进制数”的?
发布于 2021-09-07 09:25:39
用户字段中的大写S表示设置了setuid位,但执行权限没有设置(这没有什么意义)。小写S意味着设置setuid位和执行权限。
至于数值,它是在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. 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.https://askubuntu.com/questions/1362343
复制相似问题