今天早上一来就收到nagios
一堆报警邮件,
而且都是critical,
某台机器的磁盘空间不足,
细细查看发现 早4
点-12
点(
服务器在美国,
所以是美国时间),72G
的根分区使用率由40%
突然增加到100%.
到满了以后就停止了.
首先将nagios
对这个服务的邮件提醒暂时停掉,
然后登陆到服务器查看.
这么快这么大数据量的增长,
怀疑是产生了很巨大的文件.
先是按大小查大于1g
的文件 find / -size +1000000000c
查出来就一个文件,
上次修改依旧是很久以前了,
大小也就2G
而已,
显然不对 继续查找一天之内被修改的文件 find / -mtime -1 >log (
由于查找结果实在太多,
所以将输出重定向到log
文件里面)
将这个log
下载下来查看,
下面的内容引起了我的注意 /home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.sfv
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.nfo
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/Sample
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/Sample/cj-hostel2-dvdr-sample.vob
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.r46
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.r91
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.r59
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.r43
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.r28
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.rar
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.r90
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.r03
/home/xxx/.ssh/.io/Hostel.Part.II.2007.NTSC.DVDR-CuriousJotos/cj-hostel2-dvdr.r02
好家伙36G,
事发之前,
被修改的文件总共也就300M,
其余的都是事发当天修改的 而且文件的所有者和组都是xxx,
很显然是xxx
账户在作怪!
问了一下才知道是很久很久以前离职的一个人,
当时没人删这个帐号,
没想到现在被利用了 发生类似的事情特别要注意:
可疑用户,
隐藏文件,
通过last
查看登陆的用户,
当然还有日志 本文转自yahoon 51CTO博客,原文链接:http://blog.51cto.com/yahoon/50479,如需转载请自行联系原作者