Tag Archives: apache

By Sebastian Hartlaub (Own work) [CC-BY-SA-2.5 (http://creativecommons.org/licenses/by-sa/2.5)], via Wikimedia Commons

Apache with Security Enhanced Linux (SELinux)

From Quick HOWTO : Ch20 : The Apache Web Server:

Fedora Core 3 introduced the concept of security contexts as part of the Security Enhanced Linux (SELinux) definition. A Web page may have the right permissions, but the Apache httpd daemon won’t be able to read it unless you assign it the correct security context or daemon access permissions. Context-related configuration errors will give “403 Forbidden” browser messages, and in some cases, you will get the default Fedora Apache page where your expected Web page should be.

… to view the security context:

ls -Z

… to set web context for the current folder and its sub folders:

chcon -R -h -t httpd_sys_content_t .
Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!