Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

Forbidden

You don't have permission to access /jquery-1.8.2.js on this server.
Apache/2.2.22 (Fedora) Server at 192.168.1.3 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
show 2 more comments

1 Answer

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
add comment

Your Answer

 
discard

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.