I have trouble understanding
ls's manual regarding a file that has
rw- mode. Here's the quote:
r, the file is readable; if
−, it is not readable.
w, the file is writable; if
−, it is not writable.
The first of the following that applies:
SIf in the owner permissions, the file is not executable and set-user-ID mode is set. If in the group permissions, the file is not executable and set-group-ID mode is set.
sIf in the owner permissions, the file is executable and set-user-ID mode is set. If in the group permissions, the file is executable and setgroup-ID mode is set.
xThe file is executable or the directory is searchable.
−The file is neither readable, writable, executable, nor set-user-ID nor set-group-ID mode, nor sticky.
In particular, it seem that two sections in bold contradict each other: according to the first one, since the mode begins with
r, the file is readable, but according to the last one, the file is not readable. But, obviously, that is not the case.
So, what does that third section mean about file being "neither readable, writable..."?
- apple.com seems to be the source of the text quoted above. This is the man page (for OS X version 10.9, titled "BSD General Commands Manual"), and this is a discussion page that quotes it.
- ss64.com also has a copy of the OS X
- tuhs.org has the 4.4 BSD man page.
Beware: it uses
wwoorrddfor bold and
- freebsd.org has the FreeBSD 10.1 man page, dated March 15, 2013.
- unix.com has a copy of the bad page under the man-page/freebsd directory (for FreeBSD 11.0). Note that they also have a copy of the correct page under man-page/posix.
- The "A+ 4 Real StudyExam4Less Computer Series"
contains the text quoted in the question,
plus a couple of paragraphs about
t, but not the entire man page. It is talking about OS X. You can see pages from two slightly different versions (editions?) of this book on books.google.com here and here. certiguide.com seems to be quoting them.
- stevens.edu is a PDF file containing the BSD
(General Commands Manual) version of
ls(1). It is dated September 24, 2011.
- quora.com has the same text, but with the formatting (indentation) corrupted so badly that the meaning is ambiguous.