Enable permissive mode for SELinux troubleshooting purpose

SELinux may create problem for network service if not configured properly. So you can turn off SELinux temporarily i.e. permissive mode for SELinux. In this mode SELinux will continue its work and it will log message to system log files. But it will not block any network service or protected service.

This is great for troubleshooting purpose. For example, squid proxy server or dovecot POP3/IMAP sever known to have problem with SELinux.

You can modify the mode SELinux is running in using setenforce command. Use value 1 to put SELinux in enforcing mode. Use value 0 to put SELinux in permissive mode. Use getenforce command to find out whether SELinux is enforcing, permissive, or disabled.

Get SELinux mode

# getenforce



Set SELinux mode to permissive mode

# setenforce 0
# getenforce



GUI tools for setting up SELinux mode

If you are using Fedora Core or Red Hat Enterprise Linux use system-config-securitylevel command to setup SELinux mode and other related properties. Type the following command at shell prompt:

$ system-config-securitylevel

Selinux can be disabled by passing kernel boot parameters. You need to edit grub.conf / menu.lst/ lilo.conf file.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 6 comments so far... add one
CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
6 comments… add one
  • Satyendra Aug 4, 2006 @ 7:16

    Well.what can i say but this website is amazing for open source lover like me ….this is very good website for enhancing the experiance in UNIX envirnoment.
    I love this website very much.and everyday I like to visit this site to enhance my skills.


  • 🐧 nixCraft Aug 4, 2006 @ 9:05


    If you canΓƒΒ’Γ’β€šΒ¬Γ’β€žΒ’t visit everyday you can subscribe our full feed – http://feeds.feedburner.com/Nixcraft-LinuxFreebsdSolarisTipsTricks or sign up for the free weekly email Newsletter, get information about all our articles, posts and other stuff via email – http://groups.google.co.in/group/nixcraft

    Appreciate your post.

  • narasimha Nov 5, 2007 @ 14:19

    how do troubleshoot nfs server

    • vishnu May 17, 2011 @ 8:09

      what problem u have

  • Elkana Ajowi Apr 19, 2012 @ 13:46

    For almost four days, I have been struggling to know why my code to access SMTP server failed in Centos 6.2 yet it work in my Win XP development environment. Thanks alot for the post.

    Now I have disabled the SELinux and it is working; the next research is now on how to make this code work with SELinux enabled… a good start anywhy.


  • sapta hadi Jul 19, 2012 @ 4:42

    the alot for the post. this website help me solve my problem. i love this website


Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum