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 07-30-2007, 11:59 PM   #1
gizza23
Member
 
Registered: Jun 2005
Location: Chicago, IL, USA
Distribution: Fedora Core, CentOS
Posts: 188

Rep: Reputation: 31
.htaccess: Fundementals


Hello All,
I've come for more help with the fundementals. Obvious, it has to do with .htaccess this time.
I have a folder that's being accessed by httpd /home/domain/public_html. When I make /home/domain/public_html/.htaccess with the following directive I receive "403 Forbidden."

Order deny,allow
Allow from 192.168.2.0/255.255.255.240
Deny from all

Permissions on the file, if they matter, are as follows:
-rw-r--r-- 1 user user 70 Jul 30 23:53 .htaccess

SELinux permissions:
-rw-r--r-- user user user_ubject_r:httpd_sys_content_t .htaccess
(FC6 server)

Does anyone have any clues as to why this would work? Before you suggest that I should be using httpd.conf file to set these permissions, I want you to know that I'm configuring it from a virtual server. Thank you for your time.
 
Old 07-31-2007, 12:30 AM   #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: 326Reputation: 326Reputation: 326Reputation: 326
Besides the file context have you set the SELinux boolean to allow access to files in home directories?

setsebool -P httpd_enable_homedirs on
 
Old 07-31-2007, 12:33 AM   #3
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: 326Reputation: 326Reputation: 326Reputation: 326
Also, do you have an AllowOverride configured for the directory in httpd.conf? Without that, the .htaccess file is ignored.
 
Old 07-31-2007, 07:07 AM   #4
gizza23
Member
 
Registered: Jun 2005
Location: Chicago, IL, USA
Distribution: Fedora Core, CentOS
Posts: 188

Original Poster
Rep: Reputation: 31
Thank you for your responses macemoneta. I temporarily disables SELinux protection and I received the same error. And as for AllowOverride, that was set.

<VirtualHost 192.168.2.2:80>
SuexecUserGroup "#502" "#503"
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /home/domain/public_html
ErrorLog /home/domain/logs/error_log
CustomLog /home/domain/logs/access_log combined
ScriptAlias /cgi-bin/ /home/domain/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/domain/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all
AllowOverride All
</Directory>
<Directory /home/domain/cgi-bin>
allow from all
</Directory>
<Location /svn>
DAV svn
SVNParentPath /home/domain/svn
AuthType Basic
AuthName domain.com
AuthUserFile /home/domain/etc/svn.basic.passwd
Require valid-user
AuthzSVNAccessFile /home/domain/etc/svn-access.conf
Satisfy Any
</Location>
</VirtualHost>
 
  


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
htaccess kuplo Linux - Newbie 4 12-16-2005 05:42 AM
.htaccess luca2005 Linux - Software 2 01-01-2005 07:38 PM
.htaccess pk21 Linux - Software 3 09-23-2002 08:23 AM
.htaccess raek Linux - Newbie 1 08-17-2002 11:53 PM
.htaccess bretthoward Linux - Security 5 04-02-2001 03:33 PM


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

Main Menu
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