Ubuntu – How to change selinux modes permissive to enforce in ubuntu 14.04

selinux

How to change selinux modes from permissive to enforcing in ubuntu 14.04.

I tried

# vim /etc/selinux/config
SELINUX=enforcing
save and quiet
# init 6

after that … no luck.
when i execute getenforce command showing Disabled.

Best Answer

Simply run setenforce 1 as root. One way to do this is to run sudo setenforce 1.

You can verify that it succeeded by running sestatus and examining the output.

[root@ec2-54-183-55-79 filebeat]# setenforce 1
[root@ec2-54-183-55-79 filebeat]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28
Related Question