LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 01-30-2008, 04:58 PM   #1
hacker supreme
Member
 
Registered: Oct 2006
Location: As far away from my username as possible
Distribution: Gentoo
Posts: 259
Blog Entries: 1

Rep: Reputation: 30
Apache file permissions problem. {Apache/2.2.6 Fedora 8}


I set up a web-server in my spare time (for the experience) and have had repeated issues with files suddenly returning 403 Forbidden.

This happened with my stylesheets, and now has happened with a screenshot I put in the Images directory.

both the file (a PNG) and the directory had the same permissions. And the image is displayed if I move it to another directory.

The directory:
dr-xr-xr-x 2 root userX 4.0K 2008-01-30 15:08 Images

-r-xr-xr-x 1 root userX 333K 2008-01-30 15:07 Screenshot.png

(I did notice the numbers "2" and "1" on the listing, and don't know if this has anything to do with this.)

Code:
Index of /Images
[ICO]	Name	Last modified	Size	Description
[DIR]	Parent Directory	 	-
Apache/2.2.6 (Fedora) Server at xxx.xxx.xxx.xxx Port 80
The logs are filled with entries such as this:
[Wed Jan 30 21:21:02 2008] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: access to /Images/Screenshot.png denied

I did find one or two threads discussing a similar thing, but they are old (2005-ish) and they didn't have a conclusion.

Is there a way of fixing this, or would I be better off FFR-ing the machine and trying again?
 
Old 01-30-2008, 06:17 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
It may be related to selinux. If so, the info in these links may help:

http://www.linuxquestions.org/questi...6/#post2901803
http://docs.fedoraproject.org/selinu...ple-setup.html
http://docs.fedoraproject.org/selinu...ple-setup.html
 
Old 01-30-2008, 06:21 PM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Sounds to me you need to specify or allow Indexes within your <Directory> tag in the httpd.conf file. And never ever bring up a FFR to start over. This is not Windows, there should really never be a reason to reinstall a Linux OS when something is simply misconfigured..

And yes, disable SELinux if you have it enabled, it causes more trouble than it's worth.

Last edited by trickykid; 01-30-2008 at 06:23 PM.
 
Old 01-31-2008, 04:47 AM   #4
hacker supreme
Member
 
Registered: Oct 2006
Location: As far away from my username as possible
Distribution: Gentoo
Posts: 259
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Indexes are allowed, so I don't think it's that.
I'll have to disable SELinux when I get back home, as I can't configure it from here. (Which means there'll be a bit of a wait before I can say if it's helped or not.)

I'm sure I disabled SELinux when I installed it, but now I'm not so sure. (And yes, it does seem more trouble than it's worth.)

As to FFR-ing, I know, but I was tired and an FFR seemed like the only obvious option at the time.
 
Old 01-31-2008, 11:58 AM   #5
hacker supreme
Member
 
Registered: Oct 2006
Location: As far away from my username as possible
Distribution: Gentoo
Posts: 259
Blog Entries: 1

Original Poster
Rep: Reputation: 30
I've taken SELinux out of 'Enforcing' into 'Permissive', and now everything is working as it should be.
Thanks for the help, guys.
 
Old 01-31-2008, 04:26 PM   #6
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS
Posts: 375

Rep: Reputation: 38
If you want to run SELinux, and I would recommend it if your learning to make a machine for production, I have some pertinent info at the bottom of a post I made about NFS mounting web directories. You will want to use the chcon command to change the context of the directory and file for the web server to have permission to display the file.

http://pitmanweb.com/blog/index.php?...&c=1&tb=1&pb=1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
File permissions with Apache j_70 Linux - Software 1 08-15-2006 03:38 PM
Apache file permissions tntcoder Linux - Newbie 2 08-23-2005 07:50 PM
Apache and File Permissions Matir Linux - Security 6 08-13-2005 01:22 AM
File permissions with apache deee Linux - Newbie 3 03-31-2004 03:24 PM
Apache and File Permissions notstrider Linux - Networking 1 03-14-2003 12:44 PM


All times are GMT -5. The time now is 04:01 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration