/var/log/messages. Het volgende is een voorbeeld AVC weigering (gelogd naar messages) die optrad toen de Apache HTTP server (draaiende in het httpd_t domein) probeerde toegang te krijgen tot het /var/www/html/file1 bestand (gelabeld met het samba_share_t type):
hostname setroubleshoot: SELinux is preventing httpd (httpd_t) "getattr" to /var/www/html/file1 (samba_share_t). For complete SELinux messages. run sealert -l 84e0b04d-d0ad-4347-8317-22e74f6cd020
sealert -l 84e0b04d-d0ad-4347-8317-22e74f6cd020 commando uit om de complete boodschap te zien. Dit commando werkt alleen op de locale machine, en presenteert dezelfde informatie als de sealert GUI:
$ sealert -l 84e0b04d-d0ad-4347-8317-22e74f6cd020 Summary: SELinux is preventing httpd (httpd_t) "getattr" to /var/www/html/file1 (samba_share_t). Detailed Description: SELinux denied access to /var/www/html/file1 requested by httpd. /var/www/html/file1 has a context used for sharing by different program. If you would like to share /var/www/html/file1 from httpd also, you need to change its file context to public_content_t. If you did not intend to this access, this could signal a intrusion attempt. Allowing Access: You can alter the file context by executing chcon -t public_content_t '/var/www/html/file1' Fix Command: chcon -t public_content_t '/var/www/html/file1' Additional Information: Source Context unconfined_u:system_r:httpd_t:s0 Target Context unconfined_u:object_r:samba_share_t:s0 Target Objects /var/www/html/file1 [ file ] Source httpd Source Path /usr/sbin/httpd Port <Unknown> HosthostnameSource RPM Packages httpd-2.2.10-2 Target RPM Packages Policy RPM selinux-policy-3.5.13-11.fc11 Selinux Enabled True Policy Type targeted MLS Enabled True Enforcing Mode Enforcing Plugin Name public_content Host NamehostnamePlatformLinux hostname 2.6.27.4-68.fc11.i686 #1 SMP Thu Oct30 00:49:42 EDT 2008 i686 i686 Alert Count 4 First Seen Wed Nov 5 18:53:05 2008 Last Seen Wed Nov 5 01:22:58 2008 Local ID 84e0b04d-d0ad-4347-8317-22e74f6cd020 Line Numbers Raw Audit Messages node=hostnametype=AVC msg=audit(1225812178.788:101): avc: denied { getattr } for pid=2441 comm="httpd" path="/var/www/html/file1" dev=dm-0 ino=284916 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:samba_share_t:s0 tclass=file node=hostnametype=SYSCALL msg=audit(1225812178.788:101): arch=40000003 syscall=196 success=no exit=-13 a0=b8e97188 a1=bf87aaac a2=54dff4 a3=2008171 items=0 ppid=2439 pid=2441 auid=502 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=3 comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)
/var/log/messages. In dit voorbeeld, werd het httpd proces toegang geweigerd tot een bestand (file1), welke gelabeld is met het samba_share_t type.
file1 gelabeld met het samba_share_t type. Dit type wordt gebruikt voor bestanden en mappen die je wilt exporteren met Samba. De beschrijving suggereert het veranderen van het type naar een type dat bereikt kan worden door de Apache HTTP server en Samba, als die toegang gewenst is.
file1 te veranderen naar public_content_t, welke toegankelijk is voor de Apache HTTP server en Samba.
selinux-policy-3.5.13-11.fc11), maar die niet zal helpen om de reden van de weigering op te lossen.
/var/log/audit/audit.log die verbonden zijn met de weigering. Refereer naar Paragraaf 7.3.6, “Ruwe audit boodschappen” voor informatie over ieder item in de AVC weigering.