The r
permission of folders determines whether you can list the contents. If a folder has x
but not r
, then you can access files as long as you know their names.
An example for this is to allow users to publish HTML documents in their home folders. For this, set the permissions for /home/user
to rwx-----x
and /home/user/public_html
to rwx---r-x
That way, the HTML server can access the folder (it can walk though your home folder) but it can't see any files outside of the public_html
folder.