403 Forbidden Per User Web Directory?

Hello all,

Well I'm trying to set up a /~user/ web directory. I have done this is the past with Apache 1.0, but now with 2.0 I am unable to do this. Everytime I set it up I get denied with 403. Every other aspect of the server works fine except for this. I'm leaning towards permissions, but as I said I have set this up in 1.0 with no problems. Here is a little of my httpd.conf:

LoadModule userdir_module modules/mod_userdir.so

User apache
Group apache

<IfModule mod_userdir.c>
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    # UserDir "disable"

    # To enable requests to /~user/ to serve the user's public_html
    # directory, use this directive instead of "UserDir disable":  
UserDir public_html

<Directory "/home/user/public_html">
        Options Indexes Includes FollowSymLinks
        AllowOverride None
        Allow from from all

        Order allow,deny

I see no other configs in /conf.d as was an earlier problem with webalizer and mrtg. So I'm not sure where else to look.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shouldn't it be
Allow from all
 instead of
Allow from from all

Could you also check eror.log file?
in that file you will see more explanation for error
GR999Author Commented:
Yes you are correct....didn't help though. Here is what errror_log has:

[error] [client] (13)Permission denied: access to /~user/ denied

Not sure what clues are there. Wrong permissions to home folder???

First question is: are the User and Group directives are both the same on Apache1.3 and apache2.0 configs ?
From log file it seems it didn't load userdir_module. Because it seems that URL /~user/ is not translated to correct /home/user
Try to comment <IfModule mod_userdir.c>
and </IfModule> lines.
Then you will see immediatelly during startup of apache error if mod_userdir is not loaded
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

GR999Author Commented:

[Tue Nov 23 17:03:12 2004] [notice] caught SIGTERM, shutting down
[Tue Nov 23 17:03:12 2004] [notice] core dump file size limit raised to 4294967295 bytes  
[Tue Nov 23 17:03:13 2004] [notice] mod_python: Creating 10 session mutexes based on 10 max process$
[Tue Nov 23 17:03:13 2004] [notice] Digest: generating secret for digest authentication ...
[Tue Nov 23 17:03:13 2004] [notice] Digest: done
[Tue Nov 23 17:03:14 2004] [notice] Apache/2.0.49 (Fedora) configured -- resuming normal operations

So I guess its not loading the module? If so how do i fix this?

try first check config file:
>apachectl configtest
then check that file modules/mod_userdir.so exists under $ServerRoot (ServerRoot directive value)

Also you can check which modules are compiled to apache by calling:
>httpd -l

If module mod_userdir is not compiled then you should recompile apache with adding --enable-module=userdir
--enable-module=userdir should be added during calling configure
GR999Author Commented:
Ok well this was an rpm....can it still be reconfigured? I have downloaded the newest version of source from apache, might as well install it from scratch with the right support. Question is if I uninstall the rpm, will i lose any data?

I didn't install apache from rpm, I can't say wiil it delete data or not.
Check public_html under the user's home to see if it is "rx" by apache, the typical permissions should looks like:

drwxr-sr-x  14 yuzh     nobody      1536 May 12  2004 public_html/

To set the dir permission:

chown yuzh:nobody public_html
chmod 3750 public_html

   chmod 3750 = chmod 750 dirname ; chmod g+s dirname

man chmod
to leran more details

GR999Author Commented:
What should the permissions be on the /home/user folder?

You might have the same problem I experienced. If you have SELinux enabled,
run "system-config-securitylevel"
Click the SELinux tab.
Expand the HTTPD tree.
Check Disable SELinux protection for httpd daemon.
Click OK, then Yes.
Restart httpd.

That did it for me.
just make sure a+x for /home/user, and public_html dir as http:#12661865

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
also check your error_log file, to see the cause of the problem.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.