Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Trying to view a javascript file (via http) on my server I get the following error:


You don't have permission to access /jquery-1.8.2.js on this server.
Apache/2.2.22 (Fedora) Server at Port 80

I have given all users access to the file like this:

sudo chmod -R 777 /var/www/html/jquery-1.8.2.js

I have even gone as far as changing the user & group properties in the httpd.conf file.

share|improve this question
Does the uid under which httpd is running have read and execute permission for the containing directory? Is /var/www/html the correct path for your document root? Is it possible that your Apache configuration tells the server to look elsewhere? – Michael McNally Oct 22 '12 at 21:38
How did you configure Apache? – Michael Hampton Oct 22 '12 at 21:47
if by uid you mean user then yes, the user has 777 permissions my document root is /var/www/html im not sure if apache configuration tells the server to look elswhere, but the file is in the root directory – kdavis8 Oct 22 '12 at 21:50
my configuration has the default root directory of /var/www/html/ all i did was change the config from user apache group apache to user user group user note: user is a user on my server – kdavis8 Oct 22 '12 at 21:54
OK, now change it back. – Michael Hampton Oct 22 '12 at 21:55

Have you checked the apache error log?

Unless changed, the general default on the apache configuration is to only allow access to the sub-directories htdocs (your document root) and cgi-bin. Access to all other directories is inhibited for security reasons. You'll have to add an additional permission block for this and any other directories you might need to access.

share|improve this answer
i have not checked the logs but i am only trying to access a javascript file in the document root directory. so its giving me a 403 forbidden permission error, theres something going on with the apache daemons user permissions i think – kdavis8 Oct 22 '12 at 21:58

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.