zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    如何改变拖动时鼠标悬浮样式
    Nginx的server为0.0.0.0/0.0.0.1的作用?
    redis的lua脚本拓展,返回nil及其判断
    lua异常捕获
    nginx配置及常见问题
    centos安装postgresql-10及操作
    23种设计模式
    php的function() use($args)用法
    lua中self.__index = self是什么意思?
    lor实践
  • 原文地址:https://www.cnblogs.com/helloweblogic/p/3700929.html
Copyright © 2011-2022 走看看