Как изменить режим selinux с разрешающего на принудительное в Ubuntu 14.04.
Я пытался
# vim /etc/selinux/config
SELINUX=enforcing
save and quiet
# init 6
после этого ... не повезло. когда я выполняю команду getenforce
, показывая Отключено.
Как насчет этой идеи? Откройтесь терминал
sudo -i
cd /etc/selinux/
gedit config
Вот то, на что он похож:
# 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 - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# default - equivalent to the old strict and targeted policies
# mls - Multi-Level Security (for military and educational use)
# src - Custom policy built from source
SELINUXTYPE=ubuntu
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
Вносят Ваши изменения и сохраняют как
Просто выполненный setenforce 1
как корень. Один способ сделать это должно работать sudo setenforce 1
.
можно проверить, что это успешно выполнилось путем выполнения sestatus
и исследования вывода.
[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