In fedora the SElinux set-up and configuration files are in /etc/selinux. Most of these are created/modified using SElinux administration tools such as "semanage" (we will look at these tools later). In addition to the configuration files governing the overall SElinux set-up, the policy rules can also be tweaked without needing to even look at the policy rules themselves. This is done through booleans, on-off switches that modify how a particular rule or set of rules in the active policy work.
Within the /etc/selinux/targeted directory (where the targeted policy is specified):
#cat /selinux/policyvers
21Within the /etc/selinux/targeted/contexts directory (were all the security contexts for the targeted policy are defined):
httpd_sys_content_t, automatically allowing the web server access to them. Suppose I want /var/html to be used as the default html location for my web documents rather than /var/www (the default on fedora). After creating /var/html, this can be done with:#chcon -R -t httpd_sys_content_t /var/htmlhttpd_sys_content_t that allows access to the web server processesThe on-off boolean switches that tweak aspects of the active policy not only allow certain policy changes to be made on the fly, but also means a good number of administrators may never need to play with policy rules directly. The easiest way to see and change the boolean tweaks for the active policy is using the graphical interface program system-config-securitylevel (it can be run from the fedora/gnome panel menu "System→Administration→Security level and firewall"). But we will get our hands dirty with some command line tools. To see all the booleans available we can use the command getsebool with the -a option:
#getsebool -a
allow_cvs_read_shadow --> off
allow_daemons_dump_core --> on
...There are quite a few booleans and their names are not necessarily intuitive. Fortunately their names do contain the service they relate to, so you can look at all the boolean switches belonging to a single service using the standard command line tool grep:
#getsebool -a | grep httpd
allow_httpd_anon_write --> off
allow_httpd_bugzilla_script_anon_write --> off
...Also, there are some useful man pages about appropriately setting booleans for a particular service. The command "man -k _selinux" lists a number of useful man pages to look at (e.g. ftpd_selinux, httpd_selinux, samba_selinux etc.).
Booleans can be set using the command setsebool. Changes can be made to the current running system so that on reboot things return to the way they were, or with the -P option booleans settings can be made persistent across reboots.