S
significa que o bit setuid está habilitado, enquanto s
significa que o bit setuid e o bit executável estão habilitados.
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'?
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
Tags ls