Apache/httpd and permissions of user directories

Eric Dunbar eric.dunbar at gmail.com
Wed Oct 6 19:40:54 MDT 2004


Hi all, 

I'm trying to set up user directories in httpd as per the
www.hostname.com/~username. I am running into problems with
permissions:
<quote>
 Forbidden. You don't have permission to access /~bob/index.html on this server.
  Additionally, a 403 Forbidden error was encountered while trying
  to use an ErrorDocument to handle the request.
  Apache/2.0.40 Server at localhost Port 80"
</quote>

I modified httpd.conf to allow for UserDir access (UserDir Sites, and
then I created the directory Sites in /home/user) as per:
http://httpd.apache.org/docs-2.0/mod/mod_userdir.html
http://httpd.apache.org/docs-2.0/howto/public_html.html

I also found the Apache 1.3 FAQ and this comment about permissions:
<quote>
You can determine which case applies to your situation by checking the
error log.
In the case where file system permission are at fault, remember that
not only must the directory and files in question be readable, but
also all parent directories must be at least searchable (i.e., chmod
+x /directory/path) by the web server in order for the content to be
accessible.
</quote>

My concern & question:

How can I safely modify the parent directories to be searchable by
user apache without allowing other users access to the contents of
these parent directories (it's not a major concern but I'd rather
learn how to do security properly). Is having these directories
searchable a problem?

Thanks, Eric.


More information about the yellowdog-general mailing list