selinux 썸네일형 리스트형 CentOS 7에서 SELinux 상태 확인 및 비활성화 방법 CentOS 7에서 SELinux 상태 확인 및 비활성화 방법SELinux(Security-Enhanced Linux)는 Linux 시스템의 보안을 강화하기 위해 적용된 보안 모듈입니다. 하지만 개발이나 특정 서비스 설정 중에는 SELinux가 제약 요소가 되기도 합니다.SELinux 현재 상태 확인getenforceEnforcing상세 설정 확인sestatusSELinux status: enabledCurrent mode: enforcing...SELinux 일시적으로 비활성화 (재부팅하면 복구됨)현재 세션에서만 SELinux를 Permissive 모드로 전환setenforce 0Permissive0 → Permissive (허용 모드)1 →.. 더보기 Amazon Linux 2023에서 SELinux를 비활성화하는 방법 Amazon Linux 2023에서 SELinux를 비활성화하는 방법 SELinux를 비활성화할 때 고려해야 할 몇 가지 추가 사항입니다. SELinux를 비활성화하면 시스템의 보안이 저하될 수 있습니다. SELinux를 비활성화한 후 다시 활성화하면 변경 사항을 적용하기 위해 시스템을 재부팅해야 할 수도 있습니다. SELinux에 의존하는 애플리케이션을 사용하는 경우 SELinux를 비활성화한 후 제대로 작동하지 않을 수 있습니다. 테스트 환경 $ cat /etc/os-release | grep PRETTY_NAME PRETTY_NAME="Amazon Linux 2023" 1. selinux config 파일 확인 cat /etc/selinux/config # This file controls the .. 더보기 CentOS 7에서 SELinux를 비활성화하는 방법(selinux disabled) CentOS 7에서 SELinux를 비활성화하는 방법(selinux disabled)SELinux는 CentOS의 기본 보안 기능 중 하나입니다. 하지만 때로는 특정 애플리케이션이나 설정에서 SELinux를 비활성화해야 할 때도 있습니다. 이를 위해 다음과 같은 단계를 따를 수 있습니다.1. SELinux 상태 확인현재 SELinux의 상태를 확인합니다.sestatus위 명령을 실행하면 현재 SELinux 상태가 enforcing, permissive, disabled 중 하나로 나타납니다.enforcing : SELinux가 활성화되어 있고 보안 정책을 강제로 적용합니다.permissive : SELinux가 활성화되어 있지만 보안 정책을 적용하지 않습니다. 대신 정책 위반에 대한 경고 메시지가 로그에.. 더보기 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/namedSELinux Boolean 값 조정 (존 파일 쓰기 허용)setsebool -P named_write_mastet_zoned onSELinux 로그 기반 정책 허용 예외 생성egrep -i 'avc|ntfs-3g' /var/log/messages | audi.. 더보기 Apache 서버에서 발생한 문제를 해결하는 방법 Apache 서버에서 발생한 문제를 해결하는 방법오류$ /usr/local/apache2/bin/apachectl -thttpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied이 오류는 Apache 서버가 /usr/local/apache2/modules/libphp5.so 파일을 로드하려고 할 때 발생하는데 이 파일의 메모리 보호 설정과 관련된 문제가 발생.. 더보기 [apache][ERROR] apache Warning: DocumentRoot [/home/www/****] does not exist Apache 구동 시 error [root@scbyun-ns1 named]# service httpd restart httpd 를 정지 중: [ OK ] httpd (을)를 시작 중: Warning: DocumentRoot [/home/www/docs/www.scbyun.com] does not exist [ OK ] messages 로그 error [root@scbyun-ns1 named]# Oct 9 14:02:19 scbyun-ns1 setroubleshoot: SELinux is preventing the httpd from using potentially mislabeled files (./docs). For complete SELinux messages. run sealert -l f5fd0e.. 더보기 [error] named: initgroups(): Operation not permitted named 실행 시 아래와 같은 에러가 발생할 경우 [root@dns3 slaves]# service named restart named를 정지 중: [ OK ] named를 시작 중: named: initgroups(): Operation not permitted [실패] [root@dns3 slaves]# vi /var/log/messages Mar 26 21:50:03 dns3 kernel: type=1400 audit(1301143803.811:5): avc: denied { getcap } for pid=1776 comm="named" scontext=root:system_r:named_t:s0 tcontext=root:system_r:named_t:s0 tclass=process enforci.. 더보기 이전 1 다음