{"id":8,"date":"2009-02-15T12:14:07","date_gmt":"2009-02-15T17:14:07","guid":{"rendered":"http:\/\/blog-wp.beausanders.org\/b15\/?p=8"},"modified":"2017-04-29T16:03:37","modified_gmt":"2017-04-29T20:03:37","slug":"selinux-is-blocking-webalizer-on-rhel5-2-install","status":"publish","type":"post","link":"https:\/\/blog.beausanders.org\/index.php\/selinux-is-blocking-webalizer-on-rhel5-2-install\/","title":{"rendered":"SELinux is blocking Webalizer on RHEL5.2 Install"},"content":{"rendered":"<p>The following is taken from recent posts I made to <a href=\"http:\/\/www.howtoforge.com\/forums\/showthread.php?t=27297\">http:\/\/www.howtoforge.com\/forums\/showthread.php?t=27297<\/a>:<\/p>\n<p>In a recent installation of RHEL5.2, SELinux is blocking Webalizer from writing stats to <strong>\/var\/www\/html\/sitename\/stats<\/strong>. What is the best way to remedy this issue short of disabling SELinux? This is a default installation, very little customization at this point. <!--more--><\/p>\n<div class=\"smallfont\"><strong>Fixed the problem:<\/strong><\/div>\n<div id=\"post_message_147993\">\n<p>After a little reading and experimenting, I was able to fix the problem using <strong>audit2allow<\/strong>.To understand this process as it applies to REHL5.2, read <a href=\"http:\/\/www.redhat.com\/docs\/manuals\/enterprise\/RHEL-5-manual\/Deployment_Guide-en-US\/sec-sel-load-policy-package.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.redhat.com\/docs\/manuals\/e&#8230;y-package.html<\/a>First, I piped the SELinux alert message into audit2allow and used the switches as suggested by Red Hat:<strong>echo &#8220;insert alert message here&#8221; | audit2allow -M newpolicy<\/strong>In order to load this newly created local SELinux policy package (.pp) into the kernel, I ran this command:<strong>semodule -i newpolicy.pp<\/strong><\/p>\n<p>Next I tested the Webalizer cron jobs and all worked as expected with no more errors.<\/p>\n<p>I also read an interesting, but dated, article on SysAdmin&#8217;s Web site that inspired me: <a href=\"http:\/\/www.samag.com\/documents\/s=9820\/sam0508a\/0508a.htm\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.samag.com\/documents\/s=982&#8230;508a\/0508a.htm<\/a><\/p>\n<p>-Beau<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>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.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[42,27,7,40],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-solutions-to-problems-i-found-helpful","tag-centos5","tag-rhel5","tag-selinux","tag-webalizer"],"_links":{"self":[{"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":8,"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"predecessor-version":[{"id":171,"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions\/171"}],"wp:attachment":[{"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.beausanders.org\/index.php\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}