==========================
SELinux support in AWStats
==========================
What is the problem ?
---------------------
AWStats is a CGI script, and needs to be labelled correctly to be called
from Apache.
The files in ``/usr/share/awstats/wwwroot/cgi-bin`` need to have the
``httpd_sys_script_exec_t`` type, and the databases files in
``/var/lib/awstats`` need to have the ``httpd_sys_script_rw_t`` type.
How do we solve it ?
--------------------
You can change the type with the ``chcon`` command::
chcon -R -t httpd_sys_script_exec_t /usr/share/awstats/wwwroot/cgi-bin
chcon -R -t httpd_sys_script_rw_t /var/lib/awstats
But these modifications will be lost if the system is relabeled (you can
request a relabel with the system-config-security tool).
To make these changes permanent, this package sets the contexts by running
the following commands::
semanage fcontext -a -t httpd_sys_script_exec_t \
'/usr/share/awstats/wwwroot/cgi-bin(/.*)?'
semanage fcontext -a -t httpd_sys_script_rw_t '/var/lib/awstats(/.*)?'
Please send your bug reports (if any ;) ) to https://bugzilla.redhat.com