Blame SOURCES/mod_fcgid-2.1-README.SELinux

b04572
Using mod_fcgid with SELinux in Fedora Core 5 / RHEL 5 onwards
b04572
==============================================================
b04572
b04572
Versions of this package built for Fedora Core 5, 6, or 7 include an SELinux
b04572
policy module to support FastCGI applications. Later Fedora releases and Red
b04572
Hat Enterprise Linux 5.3 onwards include the policy in the main selinux-policy
b04572
package and do not require the separate module.
b04572
b04572
The module source (fastcgi.{fc,te}) is included for reference as documentation
b04572
in the package.
b04572
b04572
The module uses the same set of SELinux types for FastCGI applications as for
b04572
regular CGI scripts (or "system scripts" as they are known in SELinux), as
b04572
described in "man httpd_selinux".
b04572
b04572
 * httpd_sys_content_t
b04572
 - Set files with httpd_sys_content_t for content that is available
b04572
   from all FastCGI scripts and the daemon.
b04572
b04572
 * httpd_sys_script_exec_t
b04572
 - Set FastCGI scripts with httpd_sys_script_exec_t to allow them to run
b04572
   with access to all system script types.
b04572
b04572
 * httpd_sys_script_ro_t
b04572
 - Set files with httpd_sys_script_ro_t if you want httpd_sys_script_exec_t
b04572
   scripts to read but not write the data, and disallow other processes from
b04572
   access.
b04572
b04572
 * httpd_sys_script_rw_t
b04572
 - Set files with httpd_sys_script_rw_t if you want httpd_sys_script_exec_t
b04572
   scripts to read/write the data, and disallow other processes from access.
b04572
b04572
 * httpd_sys_script_ra_t
b04572
 - Set files with httpd_sys_script_ra_t if you want httpd_sys_script_exec_t
b04572
   scripts to read/append to the file, and disallow other processes from
b04572
   access.
b04572
b04572
So for the moin wiki layout described in README.RPM of the main mod_fcgid
b04572
package, the contexts would be set as follows:
b04572
b04572
    cd /var/www/mywiki
b04572
    chcon -t httpd_sys_content_t .
b04572
    chcon -R -t httpd_sys_script_exec_t cgi-bin
b04572
    chcon -R -t httpd_sys_script_rw_t data underlay
b04572
b04572
It is necessary to turn on the httpd_enable_cgi boolean to run either regular
b04572
or FastCGI scripts:
b04572
b04572
    setsebool -P httpd_enable_cgi 1
b04572
b04572
The httpd_can_sendmail boolean is used to specify whether any of your
b04572
web applications can make outbound SMTP connections (e.g. moin sending
b04572
notifications). By default it is off, but can be enabled as follows:
b04572
b04572
    setsebool -P httpd_can_sendmail 1
b04572
b04572
Only enable this functionality if you actually need it, since it increases the
b04572
chances that any vulnerability in any of your web applications could be
b04572
exploited by a spammer.
b04572
b04572
If you have any questions or issues regarding FastCGI and SELinux, please don't
b04572
hesitate to bring them up on fedora-selinux-list.
b04572