본문 바로가기

리눅스

CentOS 6에서 SELinux 설정 해제

반응형

CentOS 6에서 SELinux 설정 해제

현재 named 실행 파일의 SELinux 컨텍스트 확인

ls -lZ /usr/sbin/named
-rwxr-xr-x  root     root     system_u:object_r:named_exec_t   /usr/sbin/named

사용자 컴파일된 BIND(named) 바이너리에 컨텍스트 적용

chcon -R -u system_u -t named_exec_t /usr/local/nbind/sbin/named

SELinux Boolean 값 조정 (존 파일 쓰기 허용)

setsebool -P named_write_mastet_zoned on

SELinux 로그 기반 정책 허용 예외 생성

egrep -i 'avc|ntfs-3g' /var/log/messages | audit2allow -M ntfs3g
semodule -i ntfs3g.pp

SELinux 모듈에서 named 관련 권한 허용 예시

$ semodule -i ntfs3g.pp
allow named_t named_t:process { getcap setcap };
setsebool -P named_disable_trans=1

named 서비스만 SELinux에서 해제하고 싶을 때

$ setsebool -P named_disable_trans=1

 

참고URL

- 변군이글루 : CentOS 7에서 SELinux를 비활성화하는 방법

- 변군이글루 : CentOS 6에서 SELinux 설정 해제

 

728x90
반응형