SELinux는 CentOS7에서 비활성화되지 않습니다.

SELinux는 CentOS7에서 비활성화되지 않습니다.

지금 당장 단기적으로 영구적으로 비활성화하고 싶지만 아무것도 효과가 없는 것 같습니다.

내가 시도한 단계

[root@db1e secure]# setenforce 0
[root@db1e secure]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          disabled
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28

/etc/selinux/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=disabled 
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

그런 다음 httpd 서비스를 다시 시작하십시오.

둘 다 여전히 내가 예상하는 비활성화 대신 비활성화 상태와 동일한 상태가 됩니다. 어떤 아이디어가 있습니까?

답변1

파일을 편집한 후 /etc/sysconfig/selinux변경 사항을 적용하려면 다음을 수행해야 합니다.재부팅SELinux를 완전히 비활성화하려면 시스템을 사용하세요. setenforce 0재부팅이 발생할 때까지 시스템을 "허용" 모드로 전환 할 수 있습니다 .

SELinux=enforcing다음 으로 변경하세요.SELinux=disabled

관련 정보