LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 08-21-2006, 08:08 PM   #1
Raybrandt
LQ Newbie
 
Registered: Apr 2006
Location: ...Earth.
Posts: 2

Rep: Reputation: 0
Forbidden error when chmodded 777 and chowned apache


This feels like something that should be so very, incredibly obvious, but I'm having trouble figuring it out.

I'm using the Apache installation included with Fedora Core 5 (as opposed to one from source, though I'm not sure how much it matters here). I have a directory with files in it (extracted from a .zip file -- it's from the SourceForge "amazoop" project if it helps any, just so we're on the same page), and when I extracted it to my server homepage directory (/var/www/html), under its own subdirectory(titled amazoop), the subdirectory and its files were unreadable by Apache. I tried making a new folder and moving the files into there (naming the old folder "snacks", which it still couldn't read, and naming the new directory "amazoop" again, but it just shows up as an empty folder and trying to read the files or subfolders results in a Forbidden error from Apache. I already tried:

chmod -R 777 amazoop
and
chown -R apache amazoop

...but, oddly, it still doesn't help. I'm fairly certain it's something weird with the files, since I remember having to chown them as my main user just to read them after chmod'ing 777 (though I just chown'd them back to root and could still read them as my main user, so maybe I'm just crazy; but I still can't view them through Apache), and I have to use su to chown them to apache even when I'm logged in as my regular user. Even when I do this, when I try to view anything in the directory, it still doesn't let me.

There's no .htaccess in the folder, either. I checked httpd.conf for anything unusual -- I didn't notice anything, but I'm still pretty new at this, so it's likely I could've missed something. Anyway, it gives me the feeling that this should be something incredibly simple and obvious, but I'm still missing it (again, I'm still new at this). I'd definitely appreciate any ideas of what to look at that might help.

P.S. - When I downloaded the .tar.gz version of amazoop and extracted it as my user, even I couldn't read them. I had to use su and delete them from the command line. It could be something with them rather than a generic Linux question, but seeing as the site doesn't mention anything about it in the documentation or the forums, I'm guessing this problem is unique to me.
 
Old 08-21-2006, 08:38 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
It's not the permissions, it's the file context. Fedora Core is a highly secure distribution that includes SELinux - I assume that's why you selected it. To set the file context for web content:

/usr/bin/chcon -R -t httpd_sys_content_t amazoop

And reset the permissions! Global write and execute is a nightmare waiting to happen. For more on SELinux, look here.
 
  


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 error even though permissions are 777 leftPeg Linux - Software 2 08-07-2006 02:18 AM
Apache Forbidden error Ab3n Linux - Newbie 1 01-28-2006 10:45 PM
Apache: Forbidden Error Ninja Cow Linux - Software 2 12-07-2003 12:24 PM
Apache forbidden error!!!!!!!!!!! RKris Linux - Software 5 11-24-2003 07:17 AM
Apache 2.0.4 .. FORBIDDEN error CRego3D Linux - Software 6 05-15-2003 10:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:12 PM.

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