Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

mapping user's home directory to URL using apache.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2007, 09:57 AM
Default mapping user's home directory to URL using apache.



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@gmail.com
Reply With Quote
  #2  
Old 04-18-2007, 10:10 AM
Tim
Guest
 
Posts: n/a
Default Re: mapping user's home directory to URL using apache.

(E-Mail Removed) wrote:

> 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.


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
Reply With Quote
  #3  
Old 04-18-2007, 10:30 AM
Paul Black
Guest
 
Posts: n/a
Default Re: mapping user's home directory to URL using apache.

(E-Mail Removed) wrote:
> [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.


Is SELinux butting in and preventing the access?


--
Paul
Reply With Quote
  #4  
Old 04-18-2007, 12:57 PM
David Schwartz
Guest
 
Posts: n/a
Default Re: mapping user's home directory to URL using apache.

On Apr 18, 1:57 am, query.c...@gmail.com wrote:

> 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
>
> """


Okay, so the problem is the permissions on /~zaman

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


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

Reply With Quote
Reply

Tags
apache, directory, home, mapping, url, user

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:43 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.