当我迷恋我的服务器(Centos5.2-Final)时,我有严重的问题它宣布:
-bash: /bin/egrep: cannot execute binary file -bash: /bin/egrep: cannot execute binary file -bash: /bin/egrep: cannot execute binary file -bash: /bin/hostname: cannot execute binary file -bash: /bin/grep: cannot execute binary file -bash: /bin/grep: cannot execute binary file -bash: /bin/grep: cannot execute binary file -bash: /bin/grep: cannot execute binary file
在这个服务器上运行的apache和mysql工作正常,但是/ bin文件夹中的所有执行文件都有这个问题,其中一些不能执行(vi,uname,ps …)
有没有人遇到这个问题! 请告诉我如何解决它!
你可以请张贴以下…
ls -l /bin/hostname /bin/egrep /bin/hostname ldd /bin/hostname /bin/egrep /bin/hostname file /bin/hostname /bin/egrep /bin/hostname ls -ld /bin/ echo $SHELL
你的输出是什么:grep SELINUX / etc / sysconfig / selinux
SELinux有可能阻止访问。
这是一个rootkit …通常一些rootkit不需要编译。 所有的文件都被replace。 当你使用一些i686 Linux的时候,那些rootkits已经安装好了,但是在x86_64机器上,你会得到这些错误。 你可以检查/ usr / lib / libsh。 如果这个文件夹存在,你有一个叫做shv(4-5)的rootkit,你会发现一个名为backup的文件夹。 在该文件夹中,您将find如下所示的文件:egrep / hostname / uname / etc。 只需复制它们并replace/ bin文件,或者您可以像这样testing它们:./hostname。 您可以用yum或者.rpm文件重新安装binutils并手动安装。 请记住,如果要replace为manualy,请进行备份。
该错误应该显示为没有shebang的shell脚本,所以我不知道为什么会显示这些文件。 我想知道dynamic链接程序是否已经消失了,或者文件已经被破坏了,而且现在已经充满了别的东西。 什么file说,他们是?
我能想到的糟糕的情况是/ bin目录中的文件已经损坏。 另一种情况是ELF文件的体系结构与您的平台体系结构不匹配; 如果您有x86_64(64位)系统,但是使用无法运行x86_64可执行文件的i386(32位)内核启动,则可能会发生这种情况。