Sections
Documentation
Patrice Koehl's research web site

Room 4319, Genome Center, GBSF
University of California Davis
451 East Health Sciences Drive
Davis, CA 95616

(530) 754 5121 phone
(530) 754 9658 fax

 
Personal tools

How to deal with selinux

This page briefly explains what is selinux and mostly how to deal with it without turning it off.

What is SeLinux:

The best way to answer you questions is to ge here http://fedora.redhat.com/docs/selinux-faq-fc5/#sn-selinux-faq

My program does not execute and I don't know why

If a program does not work and you don't know why you need to :
  • check the right for the program you want to execute  see if it executable
  • check in your /var/log/messages log file for audit errors like the one bellow
audit(1171495328.734:5): avc:  denied  { name_connect } for  pid=16921 comm="httpd" .....

In this case this is what needs to be done:

#echo 'audit(1171495328.734:4): avc:  denied  { name_connect } for  pid=16921 
comm="httpd" .....'|audit2allow -M first




Generating type enforcment file: first.te
Compiling policy
checkmodule -M -m -o first.mod first.te
semodule_package -o first.pp -m first.mod

******************** IMPORTANT ***********************

In order to load this newly created policy package into the kernel,
you are required to execute

semodule -i first.pp



#/usr/sbin/semodule -i first.pp

You will of course have to have audit2allow (which should be installed by default on fedora core ) and checkpolicy to be installed (yum install checkpolicy should do the trick for the last one).