Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 1st March 2006, 04:24 PM
ajayd Offline
Registered User
 
Join Date: Jan 2005
Posts: 6
apache2 403 error on ~userdir

Hi,

I am running FC4 (2.6.11-1.1369_FC4smp) with apache2 and am unable to serve any pages from user's home directories. I have checked the following

+ made sure that the file and path to public_html/index.html is readable and executable by all
+ checked the SELinux option that allows HTTPD to serve users' home directories

Following is the error message
Code:
Forbidden
You don't have permission to access /~maxtux on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Here are the relevant parts of the httpd.conf file, any help much appreciated,
-thanks

Code:
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>
Listen 80
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule auth_ldap_module modules/mod_auth_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
Include conf.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
UseCanonicalName Off
DocumentRoot "/var/www/html"
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_userdir.c>
    #UserDir disable
    UserDir public_html
</IfModule>
<Directory /home/*/public_html>
    Options Indexes FollowSymLinks
    AllowOverride all
    Order allow,deny
    Allow from all
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain

--- remaining config as default ---
Reply With Quote
  #2  
Old 1st March 2006, 08:27 PM
ajayd Offline
Registered User
 
Join Date: Jan 2005
Posts: 6
[bump]

I managed to do a work around - uncheck the enforcing current under SELinux settings. Looks like a bad idea though but gets it working =)
Reply With Quote
  #3  
Old 20th April 2006, 05:48 AM
Spoon! Offline
Registered User
 
Join Date: Aug 2005
Location: Hell
Posts: 758
try something like
Code:
restorecon -R ~maxtux/public_html
Reply With Quote
  #4  
Old 6th September 2008, 10:49 PM
ana1400s
Guest
 
Posts: n/a
UserDir & Forbidden 403

Hi,
my DocumentRoot is "/web/myname/www"
it has subdirectories and one of them is "website" with many subdirectory such as "cat"
I want to use UserDir for cat to be accessed by **************

on httpd.conf file,
UserDir /web/myname/www/website/*

when ever I try to access it using a browser, it gives me and 403 Forbidden message

Can any one help me to avoid 403 message

Last edited by leigh123linux; 7th September 2008 at 12:59 AM.
Reply With Quote
  #5  
Old 7th September 2008, 12:37 AM
marcrblevins's Avatar
marcrblevins Offline
Registered User
 
Join Date: Jun 2006
Location: Texas
Age: 42
Posts: 4,168
I hope that ~cat is a real userid and located at /home/cat.

How do you have this section filled out?
Did you read:
http://httpd.apache.org/docs/misc/FAQ.html#forbidden
Code:
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid.  This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
<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, remove the "UserDir disable" line above, and uncomment
    # the following line instead:
    #
    #UserDir public_html

</IfModule>

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
#    AllowOverride FileInfo AuthConfig Limit
#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#    <Limit GET POST OPTIONS>
#        Order allow,deny
#        Allow from all
#    </Limit>
#    <LimitExcept GET POST OPTIONS>
#        Order deny,allow
#        Deny from all
#    </LimitExcept>
#</Directory>

Last edited by marcrblevins; 7th September 2008 at 12:48 AM. Reason: Added /home/cat for userid cat info
Reply With Quote
  #6  
Old 7th September 2008, 12:44 AM
marcrblevins's Avatar
marcrblevins Offline
Registered User
 
Join Date: Jun 2006
Location: Texas
Age: 42
Posts: 4,168
http://httpd.apache.org/docs/2.2/mod/mod_userdir.html
Reply With Quote
  #7  
Old 7th September 2008, 12:56 AM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
Quote:
Originally Posted by ana1400s
Hi,
my DocumentRoot is "/web/myname/www"
it has subdirectories and one of them is "website" with many subdirectory such as "cat"
I want to use UserDir for cat to be accessed by [url]****************/url]

on httpd.conf file,
UserDir /web/myname/www/website/*

when ever I try to access it using a browser, it gives me and 403 Forbidden message

Can any one help me to avoid 403 message

Banned till you respond !

fedoraforum.org@googlemail.com



The link you posted links to a ad site ( Spam )






P.S You also seem confused to how old you are



Quote:
Location: Melbourne Other
Date Listed: 05/09/2008

I'm male 23 of age, looking for share house not too far from Swinburne language centre email me please

myemailfor*****@gmail.com
Quote:
Location: Melbourne Melbourne City
Date Listed: 06/09/2008

Hi,
I'm 28 male, has a Camri working as a private dirver.
It's cheeper than what taxi will cost you.
it's not busy as busy as taxi
you need only to pre-plan your trip with me (start point, arrival point) so I can let you know how much that will cost you.
feel free to ask me any question

myemailfor*****@gmail.com
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5

Last edited by leigh123linux; 7th September 2008 at 01:01 AM.
Reply With Quote
Reply

Tags
403, apache2, error, userdir

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Userdir stopped working KrytenUK Servers & Networking 0 10th January 2009 07:03 PM
Apache2 - PHP error Flatron Servers & Networking 1 19th June 2005 12:50 PM


Current GMT-time: 11:21 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat