Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm having a very hard time configuring SELinux to allow Sending mail.

Looking into selinux documentation I've found I can manage ports via the semanage command, but the command can't be found.

Is there another way to manage ports using SELinux, or a way for me to find this command?

Worst case: Is there a way to disable selinux, or switch to permissive mode without rebooting?

I'm running Fedora.


share|improve this question

migrated from Mar 8 '11 at 23:00

This question came from our site for professional and enthusiast programmers.

2 Answers 2

I see the same thing on Fedora 21 using the XFCE distro. It turns out the default install does not include policyutils-python, which contains the command semanage.

You can often find out which package contains an item by using:

yum provides semanage
share|improve this answer

semanage is installed at /usr/sbin/semanage on my system — maybe that's just not in your path. It's part of the policycoreutils package, which is part of the default install but may be missing (yum -y install policycoreutils if it is).

The "big switch" approach is setenforce Permissive as root. (And setenforce Enforcing to put it back.)

What exactly are you trying to do? One approach is to find the audit log messages from your blocked action, and use audit2allow to generate a policy module. But, there may be a setting in the default Fedora policy which will enable what you want. Run getsebool -a to see a list, and use setsebool to change it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.