G'day, I have a web server running on my personal computer as a means for me to test various things. By default, Fedora (running version 10 atm) seems to set the permission for /var/www/html/ as

Deny from all

What is the easiest way to correct this? I have tried putting a .htaccess file in each folder, but I would much rather use some method that will apply to every folder under /var/www/html/. The .htaccess file I have tried using is

Order allow, deny
Allow from all
Deny from none

NOTE: I don't connect this computer to the network at all, so I don't care if "everyone" has permissions to view the folder.

Many thanks for answering.


EDIT: The contents of /etc/httpd/conf/httpd.conf (the relevant part) are:

<Directory "/var/www/html">
  Options Indexes FollowSymLinks
  AllowOverride None
  Order allow, deny
  Allow from all
</Directory>


EDIT 2: I have found that some of the files in the folder are accessible, but not all of them - the permissions of every file are the same, but while I can access compressed.css, I can't access screen.css

link|improve this question

75% accept rate
feedback

2 Answers

Did you found Deny from all in something like <Directory /var/www/html/> ? In this case you may just try to remove Deny from all and restart apache

link|improve this answer
I presume you are talking about /etc/http/conf/httpd.conf? I have posted the relevant part of that in my question. – a_m0d Jun 24 '09 at 22:34
This should be Ok, what kind of error are you getting ? did you check error_logs ? – radius Jun 24 '09 at 23:59
Error 403 Forbidden - You don't have permission to access ... on this server – a_m0d Jun 25 '09 at 0:21
feedback
up vote 0 down vote accepted

Okay, I have been shown the answer on linuxquestions.org (relevant posts are http://www.linuxquestions.org/questions/linux-server-73/permissions-problem-with-apache-735457/ - follow the link posted in there to see the solution that I used (have to limit myself to one link because new users can't post more than one link)). Basically, the problem is that the SELinux context was wrong - of course, this does not show up on a normal

ls -l

but it is very easy to see with

ls -lZ
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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