Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I recently got a malware on my website. I have made the backup of the website on my computer and trying to wipe off my FTP. I am trying to delete the root folder but getting this error message on all of the malicious files,

Response:   550 Could not delete index.php: Permission denied

I am the sole administrator of the ftp so permission should not have been an issue. My host provider seems not to suffer from this problem as his websites are running well without any malware.

I have also tried to change the root to 777 to see if the file permission change could help me delete the files but still I am getting the same error. Please help out. Thanks

share|improve this question
    
Contact your host and let them know your problem. Most hosts can scan for rogue php files in your folders to help you track down the malware. They should care because there's always a chance the server was rooted. –  Anagio Dec 8 '12 at 10:49
    
Thanks. My host is my friend who has actually taken a dedicated server for himself. –  Fahad Uddin Dec 20 '12 at 20:13
add comment

2 Answers 2

up vote 1 down vote accepted

The FTP account either virtual or shell account doesn't have rw permissions to delete the root folder. You'll need to SSH in su to root and delete what you want

share|improve this answer
    
Thanks. I contacted my provider. Even he was unable to delete it permanently(the files kept on coming again and again whenever he deleted them). Now finally he has created the hosting again. –  Fahad Uddin Dec 20 '12 at 20:14
    
Your provider is probably a reseller who doesn't have access to the server like your real host. –  Anagio Dec 20 '12 at 23:33
add comment

Have you tried changing the permissions of each files individually ? I mean, only those who trow that Permission denied message when you try to delete them. Also what do you mean exactly by "the root folder", the root of your hosting account if you are on a shared host or the "public_html" folder ? Maybe there is some sort of additional protections on those special files so I would suggest you to simply do a CTRL+A in this "root folder" and press delete.

share|improve this answer
1  
Yeah that additional protection is normal file restrictions on Unix/Linux systems he doesn't own public_html only the files and folders which he's created within it. Also Ctrl+A? What if he's logging in from a terminal? How about rm -rf –  Anagio Dec 8 '12 at 10:19
    
rm -rf ? What if he is logging in from a screwdriver by opening the hard drive and trying to delete files with fucking magnets ? ahah i'm just kidding :) I assumed he would have been able to translate this CTRL+A thing into what he is using. –  WiMantis Dec 8 '12 at 10:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.