SELinux is blocking Webalizer on RHEL5.2 Install

Discussion in 'Server Operation' started by BeauSanders, Oct 1, 2008.

  1. BeauSanders

    BeauSanders New Member

    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.

    Thank you in advance for your assistance.

    Last edited: Oct 1, 2008
  2. BeauSanders

    BeauSanders New Member

    Fixed the problem

    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

    First, I piped the SELinux alert message into audit2allow and used the switches as suggested by Red Hat:

    echo "insert alert message here" | audit2allow -M newpolicy

    In 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.

    I also read an interesting, but dated, article on SysAdmin's Web site that inspired me:


Share This Page