403 forbidden - Apache - Folder Permissions.

General support questions
Post Reply
b0bby
Posts: 18
Joined: 2011/09/23 13:25:16

403 forbidden - Apache - Folder Permissions.

Post by b0bby » 2011/11/08 11:47:53

Hey All,

In my /etc/httpd/conf/httpd.conf when i set the documentroot to the folder: apache/www/
it goes: 403 Forbidden

When the folder is set to /var/www/html/ there's no problem...
- Do i set the permission to 700 (does it work with phpmyadmin?)
- Do i have to chmod chown ??

User avatar
TrevorH
Site Admin
Posts: 33228
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: 403 forbidden - Apache - Folder Permissions.

Post by TrevorH » 2011/11/08 14:34:05

So you set the document root to

[code]
DocumentRoot "apache/www/"
[/code]

like that? Never tried anything like that but on my system the apache user's home directory is set as /var/www in /etc/passwd so what I set above would result in it trying to use a directory called /var/www/apache/www/ for the document root. That doesn't exist on my system so would probably result in a 403 like you see. If you created that directory as root then it would exist but it would be owned by root:root and would probably have no access for the apache user - another 403.

Did you really mean to set it to "apache/www/"?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

403 forbidden - Apache - Folder Permissions.

Post by pschaff » 2011/11/10 22:13:30

Try it after doing[code]setenforce 0[/code]to temporarily put SELinux in Permissive mode. If that helps then the troubleshooter should give you clues about how to fix the issue.

Post Reply