avc: denied 故障处理

来源:互联网 发布:o2o系统源码 编辑:程序博客网 时间:2024/04/29 15:07

Apr 18 10:21:08 localhost kernel: audit(1208485268.980:0): avc:  denied  { rawip_recv } for  saddr=59.41.223.152 src=56054 daddr=121.9.205.164 dest=80 netif=eth0 scontext=system_u:object_r:unlabeled_t tcontext=system_u:object_r:netif_eth0_t tclass=netif
Apr 18 10:21:11 localhost kernel: audit(1208485271.950:0): avc:  denied  { rawip_recv } for  saddr=59.41.223.152 src=56054 daddr=121.9.205.164 dest=80 netif=eth0 scontext=system_u:object_r:unlabeled_t tcontext=system_u:object_r:netif_eth0_t tclass=netif
Apr 18 10:21:17 localhost kernel: audit(1208485277.956:0): avc:  denied  { rawip_recv } for  saddr=59.41.223.152 src=56054 daddr=121.9.205.164 dest=80 netif=eth0 scontext=system_u:object_r:unlabeled_t tcontext=system_u:object_r:netif_eth0_t tclass=netif
Apr 18 10:21:29 localhost kernel: audit(1208485289.887:0): avc:  denied  { rawip_recv } for  saddr=59.41.223.152 src=56054 daddr=121.9.205.164 dest=80 netif=eth0 scontext=system_u:object_r:unlabeled_t tcontext=system_u:object_r:netif_eth0_t tclass=netif
Apr 18 10:21:30 localhost nmbd[20674]: [2008/04/18 10:21:30, 0] nmbd/nmbd_packets.c:process_browse_packet(1050)
Apr 18 10:21:30 localhost nmbd[20674]:   process_browse_packet: Discarding datagram from IP 121.9.205.161. Source name LOCALHOST<00> is one of our names !

这是开启tux服务后,访问服务器时的系统日志信息.该服务器是rhel4系统,从上面的信息看是系统开启了SELINUX从而导致tux、apache等服务无权访问相关的documentroot.
红帽企业 Linux 4 包括了一个 SELinux 的实现。SELinux 代表了用户,程序以及进程间相互交流的主要变化。在这个发行版本中,SELinux 被默认安装并被开启使用。

在安装的过程中,您可以选择禁用 SELinux,或是设置它只记录警告信息,或是使用它的只在以下守护进程中有效的目标化策略:dhcpd、httpd、mysqld、named、nscd、ntpd、portmap、postgres、snmpd、squid、syslogd

目标化策略在默认的情况下被启用。

红帽企业 Linux 4 使用在 ext2/ext3 文件系统上的扩展属性来支持 SELinux。这就意味着,当一个文件被写到默认挂载的 ext2/ext3 文件系统中时,一个扩展的属性也会被写入。

当系统有 红帽企业 Linux 4 和 红帽企业 Linux 2.1 双重启动的时候,这就可能会产生一些问题。红帽企业 Linux
2.1 内核不支持文件的扩展属性,当它遇到文件的扩展属性时,系统可能会崩溃。有Linux桌面用户在安装了Redhat Enterprise Linux 4.0后,可能会需要关闭SELinux,正确的方法是:
修改/etc/selinux/config文件中的SELINUX="" 为 disabled ,然后重启。