Fedora Linux Support Community & Resources Center
  #1  
Old 7th October 2009, 12:23 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
403 Forbidden

I'm trying to setup drupal:
Code:
[tim@computim httpd]$ cd /var/www/html/
[tim@computim html]$ ls -l
total 0
lrwxrwxrwx. 1 root root 18 2009-10-07 11:50 drupal -> /usr/share/drupal/
when i head to http://localhost/drupal
i get:

Forbidden
You don't have permission to access /drupal on this server.

I think under ubuntu the html folder is owned by a www user maybe there is a similar user under fedora?
Reply With Quote
  #2  
Old 7th October 2009, 12:37 PM
mndar's Avatar
mndar Online
Registered User
 
Join Date: Feb 2005
Posts: 1,100
linuxfirefox
What are the permissions of /usr/share/drupal/ ?
Reply With Quote
  #3  
Old 7th October 2009, 12:41 PM
dhimes Offline
Registered User
 
Join Date: Jan 2008
Location: Marblehead MA USA
Posts: 296
linuxfedorafirefox
Take the following with a grain of salt, as I'm no expert.

I set up a web server so that it served from my dir: dhimes/public_html
dhimes set to chmod 711
public_html set to 755

here's what stumped me: I recently restored the directories and sub-directories under public_html, and had to set their permissions by hand (I set them to 755). When I first created them I didn't need to do that, but copying them from a backup (I upgraded to f11 with a fresh install) I had to set them.
Reply With Quote
  #4  
Old 7th October 2009, 12:48 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
Code:
[root@computim share]# ls -l /usr/share | grep drupal
drwxr-xr-x.    8 root root   4096 2009-10-06 23:49 drupal
which looks ok to me
Reply With Quote
  #5  
Old 7th October 2009, 01:15 PM
dhimes Offline
Registered User
 
Join Date: Jan 2008
Location: Marblehead MA USA
Posts: 296
linuxfedorafirefox
That directory is fine, but it's the others that are giving you a problem.
Reply With Quote
  #6  
Old 7th October 2009, 01:24 PM
dhimes Offline
Registered User
 
Join Date: Jan 2008
Location: Marblehead MA USA
Posts: 296
linuxfedorafirefox
If you are way ahead of my, I'll say this in case it means something to you. The User is apache and the Group is apache

Also, if Drupal is index.php rather than index.html, you may have to set that up in the /etc/httpd/conf/httpd.conf file (search DirectoryIndex in that file)

That file also explains directories and permissions (search DocumentRoot and UserDir)

HTH
Reply With Quote
  #7  
Old 7th October 2009, 01:50 PM
pete_1967 Offline
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,929
windows_xp_2003ie
First make sure you allow Apache to follow symlinks in the httpd.conf since that's what you're trying to use.
__________________
A Drink is Not Just For Christmas - SaskyCom :thumb:


“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime” so now go and...
RTFM FIRST: http://docs.fedoraproject.org/ & http://rute.2038bug.com/index.html.gz
Reply With Quote
  #8  
Old 7th October 2009, 02:44 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
have symlinks set to includes for /var/www/html i think:

Code:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
    Options Includes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

</Directory>
Ive seen it suggested that you just change the apache user and group to your day-to-day user in the httpd.conf file.

How can I grant the apache group permissions to a directory? chown?
Reply With Quote
  #9  
Old 7th October 2009, 02:46 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
Code:
[root@computim ~]# tail /var/log/httpd/error_log | grep drupal
[Wed Oct 07 12:55:17 2009] [error] [client ::1] client denied by server configuration: /usr/share/drupal
according to Apache docs
This message is generally caused because either

* The underlying file system permissions do not allow the User/Group under which Apache is running to access the necessary files; or
* The Apache configuration has some access restrictions in place which forbid access to the files.
Reply With Quote
  #10  
Old 7th October 2009, 03:09 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
Funny thing is my symlink to phpMyAdmin works fine. phpMyAdmin is also in /usr/share and seems to have all the same permissions set for its files and folders as the problematic drupal folder. Checked the .htaccess and it looks fine - must be some drupal specific thing
Reply With Quote
  #11  
Old 7th October 2009, 04:03 PM
pete_1967 Offline
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,929
linuxfedorafirefox
Code:
ls -lZ /usr/share/drupal
And paste back the result (for comparison, you can run same on phpMyAdmin dir.
__________________
A Drink is Not Just For Christmas - SaskyCom :thumb:


“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime” so now go and...
RTFM FIRST: http://docs.fedoraproject.org/ & http://rute.2038bug.com/index.html.gz
Reply With Quote
  #12  
Old 7th October 2009, 06:20 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
Whats this? you taking me to SELinux places?
Code:
[root@computim share]# ls -lZ /usr/share/drupal
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 COPYRIGHT.txt
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 cron.php
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 includes
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 index.php
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 install.php
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 misc
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 modules
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 profiles
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 robots.txt
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 scripts
lrwxrwxrwx. root root system_u:object_r:httpd_sys_content_t:s0 sites -> ../../../etc/drupal
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 themes
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 update.php
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 xmlrpc.php
Reply With Quote
  #13  
Old 7th October 2009, 06:24 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
phpMyAdmin has different security group
Code:
[root@computim share]# ls -lZ /usr/share/phpMyAdmin/
-rw-r--r--. root root system_u:object_r:usr_t:s0       browse_foreigners.php
...
Reply With Quote
  #14  
Old 7th October 2009, 08:00 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
Thanks to zcat on #fedora i used
Code:
rpm -qd drupal|grep fedora
to find drupal install docs

which instructed me to edit /etc/httpd/conf.d/drupal.conf and uncomment the appropriate line:

Code:
#Uncomment the following line for setup
#Allow from 127.0.0.1
then
Code:
[tim@computim conf.d]$ sudo service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for computim
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]
Hope someone finds this and it saves them a wasted day!

Last edited by Mr tim esquire; 12th October 2009 at 10:08 PM.
Reply With Quote
  #15  
Old 9th October 2009, 02:00 AM
CiaW's Avatar
CiaW Offline
Registered User
 
Join Date: May 2009
Location: eastern Washington (state) USA
Posts: 489
linuxfedorafirefox
In case this helps; using my desktop login for my root alias (under F7 and CentOS -- haven't installed Drupal or server stuff on F11 yet...) I created a group which included my regular (non-root) user, my server (lighttpd) and my root alias; then recursively gave the group create and delete permission to the lighttpd / docroot folder -- which in my case is under /var/www. Then I just used chmod to fix some of the permissions on lower level folders as needed.

I was also having permission issues; and didn't want to have to do everything logged in as root; that solved the issues.
Reply With Quote
Reply

Tags
403, forbidden

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
403 Forbidden bundy07 Using Fedora 5 20th June 2008 12:40 PM
forbidden error...........help me gaurav1185 Servers & Networking 9 1st February 2008 09:39 PM
403 Forbidden Error mjcneat Servers & Networking 2 6th June 2006 02:52 AM
403 forbidden camtse Servers & Networking 4 6th December 2004 12:19 AM
getting 403 Forbidden, please help nhansam Servers & Networking 5 14th April 2004 03:53 AM


Current GMT-time: 19:03 (Wednesday, 22-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