I was experimenting with PHP and MySQL, and wanted my localhost server to automatically list the contents of my home directory as I added new subdirectories.
When I removed the index.html and index.php files and opened the browser to that directory, it didn’t work! It gave “Permission denied: Can’t open directory”.
I looked into httpd.conf, and added Option Indexes right at the top, restarted Apache, but that made no difference.
I changed AllowOveride None to AllowOveride All, and put the commands into a .httpaccess file into the home directory, and still no change (entering garbage into .httpaccess did give an Invalid Command error, so I knew .httpaccess was being read).
In Terminal, I saw that all the permissions for my home directory were set except “read for other”:
drwxrwx-wx 32 GG GG 1088 Jan 9 22:52 Sites/
To solve the problem:
chmod +r Sites
That did it! Now I have server-generated directory listings.