What does this long listing mean?
$> ls -l developer.haml
-rw-rwSr-- 1 humon apache ......
I know what a usual listing means and I know all about what it means to be read 'r', write 'w', and executable 'x'. But what is 'S'?
From my 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.)
Basically,
S == setuid/setgid && not executable
s == setuid/setgid && executable
x == not setuid/setgid && executable
- == not setuid/setgid && not executable
S
means setuid bit enabled, while s
means setuid bit and executable bit both enabled.
man 2 chmod
which reveals also thesticky bit
.