Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    A 403 Forbidden error

    I am trying to setup a virtual host on my machine using Apache 2.0, but I keep getting this errorr:

    You don't have permission to access /~motapa/ on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    I chmod-ed my home folder to 777 an even tried 'chmod +x /home'. What am I missing?

    I am using red hat enterprise linux 4.

  2. #2
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    CA, but from N.Ireland
    You probably have to alter a few lines in the apache config file to allow access to users home directories. I can't remember which lines you have to change, but you should be able to find it quickly enough on google.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  3. #3
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    West Yorks
    Make sure you have the "UserDir" module enabled and that the /home/user and /home/user/public_html directories have permissions of 755.

  4. $spacer_open
  5. #4
    I have enabled the UserDir and changed VirtualServerName to and also the Virtualhost to but still get the error. I changed the permission to the directories to 755,but to no avail.

    This is what my apache script looks like. By the way does any one know where to find selinux docs, and how to chagne them.


    ServerAdmin root@locahost.localdomain
    VirtualDocumentRoot /home/motapa/public_html
    # DocumentRoot "/home/motapa/public_html"
    ServerAlias *
    ErrorLog logs/
    CustomLog logs/ common
    Options +Indexes
    ErrorDocument 403 /403.html
    ErrorDocument 404 /404.html

    ScriptAlias /cgi-bin/ "/home/motapa/public_html/cgi-bin"

    <Directory "/home/motapa/public_html">
    AllowOverride None
    Options +Indexes
    Order allow,deny
    Allow from all
    DirectoryIndex index.html index.htm index.php index.cgi

  6. #5
    You do realize that when you enable home dirs in Apache you potential expose them to several security threats. Especially if you do not require an index file and allow browsing, if they do not have an index file their entire home dir is now on the web including sensitive files such their fetchmail configuration, if they store passwords then those files are exposed and a whole lot of other nasties that can happen.

    I suggest instead doing this. Put a link in their home dir to a dir in the document root that you give ownership to them of. To them it looks like it is in their home dir. To the web server it is part of the normal document structure. This is far more secure and saves you issues with trying to use home dirs.

    Then you can create your virtual server. Which at a glance looks fine as long as the dirs listed in your apache config file are exactly correct.

    What I suggest is to su to the user in a console window. Then copy and paste exactly what is in Apache.conf and do an ls on it. If you have any typos in the dir structure you'll get an error or if you have any permission errors you'll get zapped.

    Next if you have troubleshootd running you may need to add a policy that allows access. A quick test is to disable SELinux and try it. If it works then you need to add a policy.

  7. #6
    No one has been able to fix this problem? I have the same problem with some servers. I am really tired of trying to find the cause. Does anyone know? I have even tried editing the website with expression and you can do everything you want except save! The error message is 403 Forbidden
    Forbidden You don't have permission to access /_vti_bin/_vti_aut/author.exe on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.37 Server at Port 80

    So... who out there can explain this problem. The server administrators can't figure it out either. I have many sites on shared servers.. none of them work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts