The following is taken from recent posts I made to http://www.howtoforge.com/forums/showthread.php?t=27297:
In a recent installation of RHEL5.2, SELinux is blocking Webalizer from writing stats to /var/www/html/sitename/stats. What is the best way to remedy this issue short of disabling SELinux? This is a default installation, very little customization at this point.
After a little reading and experimenting, I was able to fix the problem using audit2allow.To understand this process as it applies to REHL5.2, read http://www.redhat.com/docs/manuals/e…y-package.htmlFirst, I piped the SELinux alert message into audit2allow and used the switches as suggested by Red Hat:echo “insert alert message here” | audit2allow -M newpolicyIn order to load this newly created local SELinux policy package (.pp) into the kernel, I ran this command:semodule -i newpolicy.pp
Next I tested the Webalizer cron jobs and all worked as expected with no more errors.
I also read an interesting, but dated, article on SysAdmin’s Web site that inspired me: http://www.samag.com/documents/s=982…508a/0508a.htm