| Mobile | RSS

How to disable selinux

December 23rd, 2011 | 1 Comment | Posted in Linux Security
In this article we are going to check how to disable SELinux in Centos Box. SELinux brings lot of security measures  to your Linux box.It will provide an additional level of access control mechanism to files and folders on top of normal Linux security tools.So SELinux gives system administrator a finer control on his/her Linux box.
But sometimes you may feel ,you don’t need SELinux’s additional security to your system and you may want to disable it temporarily or for permanent.So we can have a look at how to disable selinux in both ways

SELinux mainly works in three modes
  1. Enforcing – This is real active mode where all operations and strictly monitored and will deny unauthorized access.
  2. Permissive - In this mode SELinux kernel switch into a mode where every operation is allowed.Operations that would be denied are allowed and a message is logged identifying that this particular operation would be denied.
  3. Disabled- In this mode,SELinux is completly disabled in kernel .And it allows all operations and no more logging for conflict.
we have different ways to disable SELinux.

Disabling temporarily

  • #setenforce 0
This will put SELinux into permissive mode until the next reboot.After reboot SELinux will comeback to enforcing mode.
Disabling permanently 
Change SELINUX=disabled in selinux configuratiion file /etc/selinux/config
But here you need to reboot your server to reflect this changes.
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

If you don’t want to reboot your server and wait for few minutes,then you can make use of a  Linux utility system-config-securitylevel.

  • system-config-securitylevel   (From graphical terminal)
  • system-config-securitylevel-tui   (From Command mode)
Disable SELinux
Disable and apply your settings.This will effect immediately and you can save your time.
Related Posts Plugin for WordPress, Blogger...

Incoming search terms:

Related posts:

Leave a Reply 223 views, 1 so far today |