Fedora Core 4 and SELinux paranoia
The default configuration of Fedora Core 4 with SELinux enabled causes problems when you want to use the UserDir feature in Apache Httpd. Problem: SELinux is stopping the httpd processes from accessing your home directory. ``` Forbidden You don't have permission to access /~foo/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.0.54 (Fedora) Server at localhost Port 80 ``` Solution: From your shell ... ``` [foo@localhost ~]$ chcon -R -t httpd_user_content_t public_html/ ``` If you get the following... ``` [foo@localhost ~]$ chcon -R -t httpd_user_content_t public_html/ chcon: failed to change context of public_html/index.html to root:object_r:httpd_user_content_t: Operation not permitted ``` It's probably because "index.html" is zero-length, I just placed an empty file in public_html and it failed first time, I removed the file and it went through the rest of it just fine. Related Links: http://the.taoofmac.com/space/Fedora http://fedora.redhat.com/docs/selinux-faq-fc3/index.html#id2825658
Related Posts
Fixing the Heartbleed vulnerability on CentOS
Quick and easy fix for the Heartbleed OpenSSL vulnerability on CentOS systems using yum update and service restart commands.
Installing CentOS packages on Red Hat Enterprise Linux
Stuck with RHEL without RHN registration? Learn how to use CentOS repositories as a workaround to install missing packages like Pidgin.
A brief history of Red Hat, Fedora and CentOS
Confused by Red Hat's Linux ecosystem? Learn how RHEL, Fedora, and CentOS evolved from one distribution into three distinct solutions for different needs.