2014-07-21 54 views
-4

我的服務器中有php文件。我試圖刪除它,但權限被拒絕。它是由php病毒創建的。爲什麼我無法刪除php文件?

根@主機[/家/ depotdeb /的public_html]#LS -la HL

總12

d--------- 2 depotdeb depotdeb 4096 Jul 16 11:25 ./ 
drwxr-x--- 6 depotdeb depotdeb 4096 Jul 21 01:49 ../ 
-rwxrwxrwx 1 depotdeb depotdeb 89 Jul 21 01:48 index.php* 
[email protected] [/home/depotdeb/public_html]# cd hl 
[email protected] [/home/depotdeb/public_html/hl]# rm -f index.php 
rm: cannot remove `index.php': Permission denied 

根@主機[/家/ depotdeb /的public_html/HL]# lsattr來的index.php

-------------e- index.php 
[email protected] [/home/depotdeb/public_html/hl]# ls -la 
total 12 
d--------- 2 depotdeb depotdeb 4096 Jul 16 11:25 ./ 
drwxr-x--- 6 depotdeb depotdeb 4096 Jul 21 01:49 ../ 
-rwxrwxrwx 1 depotdeb depotdeb 89 Jul 21 01:48 index.php* 
[email protected] [/home/depotdeb/public_html/hl]# chattr -i index.php 
[email protected] [/home/depotdeb/public_html/hl]# lsattr index.php 
-------------e- index.php 

根@主機[/家/ depotdeb /的public_html/HL]#RM index.p HP

rm: remove regular file `index.php'? y 
rm: cannot remove `index.php': Permission denied 
[email protected] [/home/depotdeb/public_html/hl]# cd ../ 

根@主機[/家庭/ depotdeb /的public_html]#CHOWN depotdeb.depotdeb HL

chown: changing ownership of `hl': Operation not permitted 

根@主機[/家庭/ depotdeb /的public_html]#CD HL

根@主機[/家/ depotdeb /的public_html/HL]#LS -IL

total 12 
26620397 d--------- 2 depotdeb depotdeb 4096 Jul 16 11:25 ./ 
    533919 drwxr-x--- 6 depotdeb depotdeb 4096 Jul 21 01:49 ../ 
26620398 -rwxrwxrwx 1 depotdeb depotdeb 89 Jul 21 01:48 index.php* 

根@主機[/家庭/ depotdeb /的public_html/HL]#

+1

該文件是否有一個覆蓋基本權限的ACL? – user3553031

+1

您對'hl' _folder_有'寫入權限嗎? – Cynical

回答

3

根據此:

d--------- 2 depotdeb depotdeb 4096 Jul 16 11:25 ./ 

你沒有寫權限的文件夾hl,其中文件位於。試試這個:

cd /home/depotdeb/public_html 
chmod 755 ./hl 
#unset the immutable bit for the folder: 
chattr -i ./hl 
rm /home/depotdeb/public_html/hl/index.php 
+0

@Cattla也許,這將有助於:http://www.howtoforge.com/forums/showthread.php?t=63363 – user4035

相關問題