• FTP - Can't Delete Empty Folder
    22 replies, posted
I accidentally created a folder on my Adam Internet hosted webspace, But now I can't delete, I right click it in Filezilla and it says I have full permissions (Rename, Move, Delete etc.) but when I right click and delete, the folder remains where it is. I've tried on a few different occasions to remove it. It comes up with this"Response: 550 Can't remove directory: Directory not empty" when i try delete it. Any ideas?
If you have ssh do. cd /were/the/folder/is ls (make sure you can see that folder) rm -rf foldernamehere (make sure its exactly the same)
No luck.
Sometimes there are hidden files in them, and that's why you can't delete them. It's really weird, it happened to me though, and you just had to go through SSH and do "dir --all" then use rm -rf filename.here
He's on shared hosting and therefore unlikely to have SSH access. You could set up a webdisk if you have cPanel and try deleting it from that.
[QUOTE=G@merGeek;21102476]He's on shared hosting and therefore unlikely to have SSH access. [/QUOTE] This is correct. [editline]01:44PM[/editline] Cpanel did not work :/
Call your hosting company's tech support line and be like "Delete this folder." and they will.
Right click the folder, click file attributes, and then change the number to 777 and check recursive. This should allow all permissions. And then try deleting. [IMG]http://imgkk.com/i/5jq1.png[/IMG]
[QUOTE=Maccabee;21135645]Right click the folder, click file attributes, and then change the number to 777 and check recursive. This should allow all permissions. And then try deleting. [IMG]http://imgkk.com/i/5jq1.png[/IMG][/QUOTE] Tried and didn't work. It kept resetting to 775 :/ [QUOTE=bios_hazard;21135129]Call your hosting company's tech support line and be like "Delete this folder." and they will.[/QUOTE] I'd do this but I'm pretty sure there's a fee to talk to a support staff or something :\
[QUOTE=Mokkan13;21166107]I'd do this but I'm pretty sure there's a fee to talk to a support staff or something :\[/QUOTE] Jesus fuck where are you hosted? If you know the full server path to the folder you can go to cpanel and set up a cronjob to do "rm -rf <path here>", but I doubt you'll figure it out.
What's your domain?
[QUOTE=Maccabee;21170526]What's your domain?[/QUOTE] Yeah this man will hack into your shit and delete it. Give him the domain goddamnit.
Normally cPanel file manager works, cPanel FTP is fucking useless sometimes.
[QUOTE='-[ Fizzadar ]-;21183901']Normally cPanel file manager works, cPanel FTP is fucking useless sometimes.[/QUOTE] That's a good idea. FTP on my new site's being a bitch and the file manager is a decent alternative.
I remember when I used to use only cPanel.
[QUOTE=Maccabee;21193330]I remember when I used to use only cPanel.[/QUOTE] Wow. Insightful.
[QUOTE=Dusty_;21194135]Wow. Insightful.[/QUOTE] Rate me informative.
[QUOTE=Maccabee;21194913]Rate me informative.[/QUOTE] Already did.
Try this: [php]<?php exec('rm -rf ./foldername/');[/php] Change foldername to the name of the folder, upload the script and run it from your browser. Make sure you don't fuck this up - double check the foldername and don't remove the . in front of it -, or you might lose everything. The reason you have to do this is because the folder was probably created as a different user as the one you're using to login with thru FTP.
[QUOTE=MD1337;21196819]Try this: [php]<?php exec('rm -rf ./foldername/');[/php] Change foldername to the name of the folder, upload the script and run it from your browser. Make sure you don't fuck this up - double check the foldername and don't remove the . in front of it -, or you might lose everything. The reason you have to do this is because the folder was probably created as a different user as the one you're using to login with thru FTP.[/QUOTE] If that doesn't work, you should check if any other system exec functions are available to you. I once made a script to check this. If the above doesn't work, try this: [php] <?php echo system('ls'); echo exec('ls'); echo shell_exec('ls'); echo passthru('ls'); ?> [/php] See which function works, then do [php] functionhere('rm -rf ./foldername/'); [/php]
exec *should* be under disabled functions on all shared hosts.
[QUOTE='-[ Fizzadar ]-;21198289']exec *should* be under disabled functions on all shared hosts.[/QUOTE] Hostgator has it enabled. You can get /etc/passwd and do [i]tree /[/i] and get a bunch of shit but permissions are proper [i]enough[/i] that you can't really do anything meaningful.
[QUOTE=MD1337;21196819]Try this: [php]<?php exec('rm -rf ./foldername/');[/php] Change foldername to the name of the folder, upload the script and run it from your browser. Make sure you don't fuck this up - double check the foldername and don't remove the . in front of it -, or you might lose everything. The reason you have to do this is because the folder was probably created as a different user as the one you're using to login with thru FTP.[/QUOTE] Wo, nice tip thanks. For me it was <?php system('ls') ?> that worked.
Sorry, you need to Log In to post a reply to this thread.