Unable to delete file


#1

Hi, I am having a spot of bother deleting a file in one of my subdomains. It is a google verification file that I added a year ago called google5dbfda5a4b10c763.html

whenever I try to delete it via FTP I get an error:

550 /darkside.stargate-brats.net/google5dbfda5a4b10c763.html: No such file or directory

when I try in webftp I get this error:
Unable to delete the file google5dbfda5a4b10c763.html

I eventually figured out that I think it is because there is a space at the beginning of the file name. going to the url in my browser works if I have the space there, but without the space I get a 404.

http://www.darkside.stargate-brats.net/ google5dbfda5a4b10c763.html

I’ve tried renaming it, overwriting it, changing its permissions, deleting the directory… all to no avail. I just can’t delete it. Anyone know what else I can do to get rid of it?


#2

Yep, spaces (as well as some other things) in a *nix filename can cause a problem.

There is a really good article from Linux Magazine about “Filename” troubles that deal with this, and other filename strangeness.

The solution to your problem is there, though you are not likely to be able to do it with your FTP program, you may have to use the shell. :wink:

–rlparker


#3

thanks, will check it out and give it a try :slight_smile:


#4

Login with the shell and navigate to where the file is located. Use “ls” to list directory contents, then change directories using “cd name_of_directory” and when you’re finally in the right directory just do a “rm \ google5dbfda5a4b10c763.html” (notice the space between the backslash and the google…).


Promo-Code: [color=#CC0000] SAVEMONEY97 [/color] - Save [color=#CC0000]$97[/color] on your first year of hosting.