长 ls 输出中大写 S 的含义

har*_*key 0 ls

这个长列表是什么意思?

$> ls -l developer.haml
Run Code Online (Sandbox Code Playgroud)

-rw-rwSr-- 1 humon apache ......

我知道通常的列表意味着什么,并且我完全了解读取“r”、写入“w”和可执行“x”意味着什么。但什么是“S”?

nne*_*neo 5

从我的man 1 ls

每个字段都有三个字符位置:

...

  3.   The first of the following that applies:

       S     If in the owner permissions, the file is not exe-
             cutable and set-user-ID mode is set.  If in the
             group permissions, the file is not executable and
             set-group-ID mode is set.

       s     If in the owner permissions, the file is exe-
             cutable and set-user-ID mode is set.  If in the
             group permissions, the file is executable and set-
             group-ID mode is set.

       x     The file is executable or the directory is search-
             able.

       -     The file is neither readable, writable, exe-
             cutable, nor set-user-ID nor set-group-ID mode,
             nor sticky.  (See below.)
Run Code Online (Sandbox Code Playgroud)

基本上,

S == setuid/setgid && not executable
s == setuid/setgid && executable
x == not setuid/setgid && executable
- == not setuid/setgid && not executable
Run Code Online (Sandbox Code Playgroud)