Linux 高级安全SELinux的关闭

Linux有一个高级安全组件,如果开启会输出打了的日志文件messages.如下:

导致/var/log/messages 达到11g

root@cpp11 ~]# df -l
文件系统               1K-块        已用     可用 已用% 挂载点
/dev/cciss/c0d0p5     14877060  12559852   1549304  90% /
/dev/cciss/c0d0p6      9920592   2951964   6456560  32% /usr
/dev/cciss/c0d0p2    236533252   8872680 215451576   4% /home
/dev/cciss/c0d0p1       497829     31091    441036   7% /boot
tmpfs                  4087756         0   4087756   0% /dev/shm

-rw------- 1 root root 11552168167 04-30 09:56 messages

Apr 30 10:17:38 cpp11 setroubleshoot:      SELinux is preventing /sbin/ifconfig (ifconfig_t) "read write" to socket:[15913] (initrc_t).      For complete SELinux messages. run sealert -l 692945d4-87c8-4885-b6c7-9f58bb7feeae
Apr 30 10:17:38 cpp11 setroubleshoot:      SELinux is preventing /sbin/ethtool (ifconfig_t) "read write" to socket:[15913] (initrc_t).      For complete SELinux messages. run sealert -l 692945d4-87c8-4885-b6c7-9f58bb7feeae
Apr 30 10:17:51 cpp11 snmpd[3461]: Connection from UDP: [127.0.0.1]:50693
Apr 30 10:17:51 cpp11 snmpd[3461]: Received SNMP packet(s) from UDP: [127.0.0.1]:50693
Apr 30 10:18:06 cpp11 snmpd[3461]: Connection from UDP: [127.0.0.1]:50696
Apr 30 10:18:06 cpp11 snmpd[3461]: Received SNMP packet(s) from UDP: [127.0.0.1]:50696
Apr 30 10:18:08 cpp11 setroubleshoot:      SELinux is preventing /sbin/ethtool (ifconfig_t) "read write" to socket:[15913] (initrc_t).      For complete SELinux messages. run sealert -l 692945d4-87c8-4885-b6c7-9f58bb7feeae
Apr 30 10:18:08 cpp11 setroubleshoot:      SELinux is preventing /sbin/ifconfig (ifconfig_t) "read write" to socket:[15913] (initrc_t).      For complete SELinux messages. run sealert -l 692945d4-87c8-4885-b6c7-9f58bb7feeae
Apr 30 10:18:08 cpp11 last message repeated 2 times
Apr 30 10:18:08 cpp11 setroubleshoot:      SELinux is preventing /sbin/ethtool (ifconfig_t) "read write" to socket:[15913] (initrc_t).      For complete SELinux messages. run sealert -l 692945d4-87c8-4885-b6c7-9f58bb7feeae
Apr 30 10:18:08 cpp11 setroubleshoot:      SELinux is preventing /sbin/ifconfig (ifconfig_t) "read write" to socket:[15913] (initrc_t).      For complete SELinux messages. run sealert -l 692945d4-87c8-4885-b6c7-9f58bb7feeae

 

解决方法:关闭SELinux

1、临时关闭(不用重启机器):
setenforce 0 
##设置SELinux 成为permissive模式 
setenforce 1 
##设置SELinux 成为enforcing模式 
2、修改配置文件需要重启机器: 
修改/etc/selinux/config 文件 将SELINUX=enforcing改为SELINUX=disabled

转载于:https://www.cnblogs.com/helloweblogic/p/3700929.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值