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'm running a server:

Apache/2.2.8 (Ubuntu) mod_ssl/2.2.8 OpenSSL/0.9.8g

Without a .htaccess file, everyone can access the web content. However, I add a .htaccess file with the following content:

Allow from all

... and everyone gets 403 Forbidden errors on every page! The permissions on .htaccess are 640. Shouldn't Allow from all be the same as having no .htaccess file? What have I done wrong?

edit: same behaviour with the following .htaccess file:

Order Allow,Deny
Allow from all

Again, with no .htaccess file everything loads without a problem.

share|improve this question

migrated from Jun 17 '11 at 19:25

This question came from our site for professional and enthusiast programmers.

I have to wonder why you would add an .htaccess file that is intended to give the same results as not having one. Something you're not telling us? – John Gardeniers Jun 17 '11 at 23:25
up vote 5 down vote accepted
Order Allow,Deny
Allow from all
share|improve this answer
Okay, tried that. Same result. :( – hughes Jun 17 '11 at 15:10
Then it's a problem with file permissions. Chmod your files to 755 or something similar. – ltamake Jun 17 '11 at 15:13
Gosh that's weird. My department explicitly advised setting the .htaccess file's permissions to 640, but that was the whole problem. 444 works too. Thanks! – hughes Jun 17 '11 at 15:16
No problem at all! :) – ltamake Jun 17 '11 at 15:16
@hughes the group or user of the files should have been set to the web user, but it was probably your own user. – Michael Lowman Jun 17 '11 at 19:33

For me, the problem was indeed file permissions as per Itamake's comment, so I fixed it with:

chmod -R 755 *
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.