The documentation of the
ls command answers these questions. On most unix variants, look up the
ls man page (
man ls or online). On Linux, look up the Info documentation (
info ls) or online.
s denotes that the setuid (or setgid, depending on the column) bit is set. When an executable is setuid, it runs as the user who owns the executable file instead of the user who invoked
the program. The letter
s replaces the letter
x. It's possible for a file to be setuid but not executable; this is denoted by
S, where the capital
S alerts you that this setting is probably wrong because the setuid bit is (almost always) useless if the file is not executable.
When a directory has setuid (or setgid) permissions, any files created in that directory will be owned by the user (or group) matching the owner (or group) of the directory.
The number after the permissions is the hard link count. A hard link is a path to a file (a name, in other words). Most files have a single path, but you can make more with the
ln command. (This is different from symbolic links: a symbolic link says “oh, actually, this file is elsewhere, go to <location>”.) Directories have N+2 hard links where N is the number of subdirectories, because they can be accessed from their parent, from themselves (through the
. entry), and from each subdirectory (through the