Search code examples
ftpfilezilla

Can't delete file from server


Ayo,

I'm using an FTP FileZilla solution and recently noticed that a few of my old directories are still on the server. I'm simply unable to erase those old directories because of one single file inside, that whenever I try to delete, says:
550 Forbidden filename

500 Forbidden filename

Does anyone know how to fix that? thanks!


Solution

  • There are a couple of potential workarounds for this, I believe it can be caused by "invisible" characters in the filename.

    Firstly, try to rename the file (ideally in shell mv 3.jpg deleteme.jpg).

    Secondly, you can try to create a PHP file in the directory which contains that file. Insert the code:

    <?php
    unlink('3.jpg');
    ?>
    

    Then load the php file in a browser or execute in shell:

    > php myphpfile.php