mapping user's home directory to URL using apache.

Discussion in 'Linux Networking' started by query.cdac, Apr 18, 2007.

  1. query.cdac

    query.cdac Guest

    Hi All,

    apache provides the facility to access user's home directory through
    URL. For that I have done the following configuration in /etc/httpd/
    conf/httpd.conf .

    # UserDir disable (commented in httpd conf file)

    UserDir public_html

    After that I have created the public_html directory under user's home
    directory.

    But when I try to access the URL , www.example.com/~user, it is giving
    403 forbidden error.
    The log file is splashing the following error.
    """

    [Wed Apr 18 14:28:40 2007] [error] [client 172.16.16.25]
    (13)Permission denied: access to /~zaman denied

    """

    I change the ownership of public_html directory to
    apache.apache .

    But even though it is not working.

    Please somebody guide me in correcting the problem.


    With thanks.
     
    query.cdac, Apr 18, 2007
    #1
    1. Advertisements

  2. query.cdac

    Tim Guest

    Hi

    Probably:

    chmod a+x ~zaman
    chmod -R a+rX ~zaman/public_html

    What you are missing is the effect of the first chmod I suspect.

    HTH

    Tim
     
    Tim, Apr 18, 2007
    #2
    1. Advertisements

  3. query.cdac

    Paul Black Guest

    Is SELinux butting in and preventing the access?
     
    Paul Black, Apr 18, 2007
    #3
  4. Okay, so the problem is the permissions on /~zaman
    Umm, why? The problem was with /~zaman (Plus, that's just wrong. For
    one thing, a normal user doesn't have permissions to do that. For
    another thing, there's no reason to have user pages that users can't
    manage.)

    DS
     
    David Schwartz, Apr 18, 2007
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.