1

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

  • 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. – user2930 Dec 20 '12 at 20:13
0

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

| 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. – user2930 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
0

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.

| 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy