the directory index (seeing all files in a directory) is a feature of the apache web server, and will activiate, like tomrock said if there isn't an index.html / equivilant file.
When you view a website, you are viewing it through the apache webserver. The webserver does have an account (typically apache, www, httpd, ect...) but this account is setup to not allow login from other services.
if there is an index.html file, you will not be able to view the files in the directory unless _you_ have an account on the server (be it ftp, smb, or similar)