为什么我能';你不能删除php文件吗?
我的服务器中有一个php文件。我试图删除它,但被拒绝。它是由php病毒创建的 root@host[/home/depotdeb/public#html][ls-la hl为什么我能';你不能删除php文件吗?,php,linux,Php,Linux,我的服务器中有一个php文件。我试图删除它,但被拒绝。它是由php病毒创建的 root@host[/home/depotdeb/public#html][ls-la hl chown: changing ownership of `hl': Operation not permitted total 12 26620397 d--------- 2 depotdeb depotdeb 4096 Jul 16 11:25 ./ 533919 drwxr-x--- 6 depotdeb dep
chown: changing ownership of `hl': Operation not permitted
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*
总数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*
root@host [/home/depotdeb/public_html]# cd hl
root@host [/home/depotdeb/public_html/hl]# rm -f index.php
rm: cannot remove `index.php': Permission denied
root@host[/home/depotdeb/public_html/hl]#lsattr index.php
-------------e- index.php
root@host [/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*
root@host [/home/depotdeb/public_html/hl]# chattr -i index.php
root@host [/home/depotdeb/public_html/hl]# lsattr index.php
-------------e- index.php
rm: remove regular file `index.php'? y
rm: cannot remove `index.php': Permission denied
root@host [/home/depotdeb/public_html/hl]# cd ../
root@host[/home/depotdeb/public_html/hl]#rm index.php
-------------e- index.php
root@host [/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*
root@host [/home/depotdeb/public_html/hl]# chattr -i index.php
root@host [/home/depotdeb/public_html/hl]# lsattr index.php
-------------e- index.php
rm: remove regular file `index.php'? y
rm: cannot remove `index.php': Permission denied
root@host [/home/depotdeb/public_html/hl]# cd ../
root@host[/home/depotdeb/public_html]#chown depotdeb.depotdeb hl
chown: changing ownership of `hl': Operation not permitted
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*
root@host[/home/depotdeb/public#html]#cd hl
chown: changing ownership of `hl': Operation not permitted
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*
root@host[/home/depotdeb/public_html/hl]#ls-il
chown: changing ownership of `hl': Operation not permitted
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*
root@host[home/depotdeb/public#html/hl]根据以下内容:
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
该文件是否具有覆盖基本权限的ACL?您是否具有对
hl
文件夹的write
权限?@Cattla也许,这将有助于: