LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-13-2005, 04:56 PM   #1
ktvoelker
LQ Newbie
 
Registered: May 2004
Location: Wisconsin, USA
Distribution: Debian (Sarge) and Fedora Core 3
Posts: 18

Rep: Reputation: 0
Apache giving mysterious 403 Forbidden


I have Apache set up and mostly working. The DocumentRoot is /var/www, and this directory contains a number of subdirectories. I can view the files and directory indices (when there are no default pages) in all of those subdirectories except one: "images". Its permissions and ownership are identical to the other subdirectories of /var/www, but when I try to access it (or its files) I get 403 Forbidden. What other things should I check?
 
Old 03-13-2005, 05:52 PM   #2
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
the permissions should be set to 755 if you want anyone to access and see them. double check that you have

owner set to rwx, user set to r-x and other set to r-x or

drwxr-xr-x

the d = directory, also verify that all of the files and subdirectories in that directory are also set to rwxr-xr-x this will give the owner full access, and everyone else will be able to read or execute the program/file/document/picture/what_ever.

to do so as owner or as root you need to type:

chmod -R 755 /path/to/modify

the -R is the recursive for chmod, unless you have already made a user for apache other then root, you will have to be root to do this as root will own everything in the /var/www subdirectory.
 
Old 03-13-2005, 09:08 PM   #3
ktvoelker
LQ Newbie
 
Registered: May 2004
Location: Wisconsin, USA
Distribution: Debian (Sarge) and Fedora Core 3
Posts: 18

Original Poster
Rep: Reputation: 0
Here are the permissions for every directory down to the ones I'm having problems with:
/var 755 owner: root
/var/www 755 owner: www-data
/var/www/html 755 owner: www-data
/var/www/html/images 755 owner: www-data
/var/www/html/funny 755 owner: www-data

DocumentRoot is /var/www/html
Apache is running as www-data

I can access http://localhost/index.shtml and the other files in the DocumentRoot. I can also access files in all of the subdirectories of the DocumentRoot except /images. I can get http://localhost/funny/quotes.shtml, but http://localhost/images/ gives me 403 Forbidden, and http://localhost/images/any-file-in-here gives me 404 Not Found, apparently because it can't navigate into that directory.

The problem is that the inability to navigate into http://localhost/images/ makes no sense, because it has the same permissions exactly as http://localhost/funny/ and that last one works fine.
 
Old 03-13-2005, 09:12 PM   #4
ktvoelker
LQ Newbie
 
Registered: May 2004
Location: Wisconsin, USA
Distribution: Debian (Sarge) and Fedora Core 3
Posts: 18

Original Poster
Rep: Reputation: 0
Never mind

I've figured it out. I looked at the error log after trying to access an image, and found that the config file has /images set as an alias to /usr/share/images......I guess I didn't look over all the default stuff thoroughly enough to notice that before.
 
Old 03-13-2005, 09:12 PM   #5
riluve
Member
 
Registered: Nov 2004
Distribution: CentOS-4
Posts: 142

Rep: Reputation: 15
look through the Apache configuration files for an alias. I had the same problem recently - it was Apache filtering the content, not the OS. Well, so at least its a possibility.

Edit - lol -jinx-
 
Old 03-14-2005, 11:41 AM   #6
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
good find.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache: 403 forbidden johnty01 Linux - Networking 5 04-05-2008 02:20 PM
apache 403 forbidden? wezhousheng Linux - Networking 5 05-13-2005 12:15 AM
Apache 403 Forbidden mrmike Linux - Newbie 3 07-10-2004 11:31 AM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
Apache 403 Forbidden quozt Linux - Networking 10 02-24-2004 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration