首页  >  问答  >  正文

shell - Centos使用root用户也无法删除文件

问题现象:
Centos系统下使用root用户也无法删除文件。文件是因为网站程序有漏洞,被hack利用在机器上产生的。

    root@localhost#rm -f list-128-1.html 
    rm: cannot remove `list-128-1.html': Permission denied

已经使用lsattr命令检查过文件的隐藏属性

    root@localhost#lsattr list-128-1.html 
    --------------- list-128-1.html
    root@localhost#chattr -i list-128-1.html
    root@localhost#rm -f list-128-1.html
    rm: cannot remove `list-128-1.html': Permission denied    

已经使用chattr -i list-128-1.html去除该文件的i熟悉,但是依然提示无权限删除文件。
请教大神,还有什么可能会让root无法删除文件吗?或者请推荐给我一种能强制删除这种文件的方法,谢谢。

高洛峰高洛峰2734 天前806

全部回复(1)我来回复

  • 仅有的幸福

    仅有的幸福2017-04-24 16:02:34

    i 属性专门用来保护重要的文件不被删除;

    chattr -i list-128-1.html
    rm -f list-128-1.html
    

    回复
    0
  • 取消回复