Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently moved from Ubuntu to Fedora. I now wish I'd done it a lot earlier because I've realised I don't know nearly as much about Linux as I ought to - Ubuntu hid a lot from me.

Previously on Ubuntu, I had a few virtualhosts pointing at a directory in my user's home dir:


Here is one of the virtualhosts:

<VirtualHost *:80>
        DocumentRoot /home/foo/Code/PHP/somedir

        <Directory /home/foo/Code/PHP/somedir/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride all
                Order allow,deny
                allow from all


I have set up in my hosts file.

What I've done so far: Upon adding the virtualhost (into /etc/httpd/conf.d/ - is this the right place?), I restarted Apache. I received a few SELinux warnings and troubleshooted them using the tool that came with Fedora. I no longer get SELinux warnings when restarting Apache or viewing in my browser. However, I still get 403 errors.

In the DocumentRoot for, I created a file called "hello.txt" which I attempted to access in my browser. Playing with file permissions and ownership did nothing. Here is a snippet from the error log:

[Sat Dec 31 20:20:34 2011] [error] [client] (13)Permission denied: access to /hello.txt denied
[Sat Dec 31 20:20:38 2011] [error] [client] (13)Permission denied: access to /hell2o.txt denied

("hell2o.txt" does not exist, "hello.txt" does).

Question: If anyone knows the solution to this problem, please share. If you have a guide to setting up Apache on Fedora (16) - please share that too, I've been unable to find anything specific to Fedora. Anything tailored to previous Ubuntu users would be an added bonus.

share|improve this question
do you have apparmor installed ? – Sandman4 Dec 31 '11 at 20:36
Not sure. It's a default Fedora install so if that comes with apparmor, then yes. How can I find out? – Tim Dec 31 '11 at 20:38
maybe see if you have /etc/init.d/apparmor . Or see if man apparmor works – Sandman4 Dec 31 '11 at 20:43
Neither of those worked, so I assume I don't have it. – Tim Dec 31 '11 at 20:58

Can you describe the "playing with file permissions" that you did?

What you'll need for this to work is for the user that Apache is running as to have traverse privileges on all the directories leading up to the file, and read privileges on the file itself.

Either one of those permissions are wrong, or you've still got SELinux issues.

share|improve this answer
Setting 777, changing ownership between root and my user. I'll look into permission on the other directories. – Tim Dec 31 '11 at 20:36

It still feels SELinux related based on the error that you're indicating and a similar error in this particular guide. The only way to rule it out completely from future configuration is to disable SELinux and setup Apache. Ensure everything works. Then turn it back on. If errors start to re-appear than you've obviously found your culprit.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.