Can Apache read files even if not in directory?


Can Apache read webserver files which don’t have the directory listing bit set on them so long as it is given the correct paths to the files, if the directory and file permissions are r–?


No. r-- permission means only the owner has the read permission. The owner can’t write or execute the file. The group and other users don’t have any permission on the file


Sorry I really mean having an r in the last octed, ie xx4, ie having the the third bit in the world/other octet set.


You will need execute permission on directories… Otherwise it is not accessible.


Read permission on directories allows you to see what the directory contains. Execute permission allows you to access the contents of the directory. The two are separate: a directory that’s executable but not readable will only allow you to access the contents if you already know their names, and a directory that’s readable but not executable will allow you to list the contents, but not touch them. (The former is much more useful than the latter — for instance, /home is usually set execute-only on our shared web servers.)