significado do capital S na saída ls longa [duplicado]

0

O que essa listagem longa significa?

$> ls -l developer.haml

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

Eu sei o que significa uma listagem usual e sei tudo sobre o que significa ler 'r', escrever 'w' e executável 'x'. Mas o que é 'S'?

    
por harmonickey 03.07.2013 / 19:41

2 respostas

4

S significa que o bit setuid está habilitado, enquanto s significa que o bit setuid e o bit executável estão habilitados.

    
por 03.07.2013 / 19:45
5

Do meu man 1 ls :

Each field has three character positions:

...

  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.)

Basicamente,

S == setuid/setgid && not executable
s == setuid/setgid && executable
x == not setuid/setgid && executable
- == not setuid/setgid && not executable
    
por 03.07.2013 / 19:49

Tags