FTP File Delete Error 550 - Prohibited File Name

Solving FTP Deletion Error "550 Prohibited file name"

by Dixie on November 3, 2009

Trying to delete a file via FTP and unable to? Getting a “550 Prohibited file name” error? Annoying! But also very easy to fix. Create a php file called “unlink.php” with this code, replacing the “YOUR-FILENAME-HERE” with–what else?–your undeleteable file name.

<?php unlink('YOUR-FILENAME-HERE');?>

Upload it to the directory with the file in question, and visit the script in your web browser. It will remove the previously unruly file.1

PHP noobs, please remember to have NO blank spaces before or after the beginning of your code in PHP files, or you’re liable to get a “Cannot modify header information/Headers already sent” error. You can create the file in a text program and simply rename it with a .php extension.

  1. Thanks to irasmith’s forum post for this solution. []
Share

{ 6 comments… read them below or add one }

Dave MonsterID Icon Dave July 28, 2010 at 11:43 am

Works! Thanks!

Serge MonsterID Icon Serge September 14, 2010 at 8:47 pm

Thanks a lot! Works great!

Murali MonsterID Icon Murali December 9, 2011 at 12:23 am

Thanks a lot!

Dutchlion MonsterID Icon Dutchlion December 27, 2011 at 12:07 pm

Your solution doesn’t work with a file with a name like D\’Hondt_2011.jpg and File Permissions 644.
The error message is: ‘Unable to access …’ and I’m not able to change the File Permissions to 755 or 777.
Is there a workaround to solve this?

Dixie MonsterID Icon Dixie December 27, 2011 at 12:19 pm

Dutch, I have no idea. I posted this after I had the issue myself and did web searches to solve it. If it were me having trouble deleting a file that’s oddly named, I’d try changing the file name first but have no idea if you’ve already tried that or not.

Dutchlion MonsterID Icon Dutchlion December 27, 2011 at 12:36 pm

Thanks for your answer, Dixie. I’v tried almost everything I could think of with Total Commander and WS-FTP, but the file is not accessible at all. Can’t change the name/permissions nor copy, delete.

Leave a Comment

Previous post:

Next post: