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.
SELinux is stopping the httpd processes from accessing your home directory.
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
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:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top