semi-invisible, indestructible ".DS_store" file on server ... how can I kill it?

On my web host, I have several folders that cannot be deleted. They appear to be empty from inside my FTP client. But from a web browser, I can see that they, in fact, contain a file named “.DS_store”.

I’ve done a little reading, and it appears that “.DS_store” is a UNIX file that the UNIX-based Max OSX uses in its behind-the-scenes work. Fine. There even appear to be some programs out there (b/c so many people are pissed that this sort of thing happens) that let you destroy such files–while the files are still on your computer.

My problem is, the files are on a remote server. It is a Windows NT 4.0 server, not even a UNIX machine. All of my site management is done through a dumb GUI interface (Fetch), not through fancy UNIX-style command-line stuff. How the hell do I remove these files?

If your FTP access to the remote machine is “anonymous”, then you very likely won’t be able to delete those files, or any files for that matter.

If you have a user account on the remote machine, and if you log in under that account (obviously), and if the containing directories allow write permission for that user (which is what Unix requires to delete files), and if your FTP client (Fetch) even provides the “delete” operation in the first place — then you should be able to delete those remote files.

Anyway, why do you care that those files are there?

Let us know what you find out.

Well, I’ve tried all of that, of course. See, those wacky little folders were full of other files that I managed to delete. And I, being the site admin, logging in as such (not as “anonymous”) and having read/write access to everything on the site, have added and deleted many other files and directories in the past. It’s just these few little buggers that won’t go away. Fetch doesn’t see the “.DS_store” files. As far as it knows, the folders are empty … but at the same time, it won’t allow me to delete them! The only reason I can even tell that the “.DS_store” files are there is b/c I later went through a web browser, which can see them for some reason.

And why do I care? Partly for sheer cleanliness reasons (the damn server gets cluttered enough as is), and partly because there are apparently valid security concerns about leaving “.DS_store” files out there–some of them contain information about your computer that a hacker could exploit.

There is some discussion here that might be helpful.

Now that’s one of the funniest statements I’ve read in a long time.

Anyway, the reason you can’t delete the .DS_store files is because they are invisible. UNIX systems use a period (.) at the beginning of a file name to flag a file is invisible. The reason these files are invisible is so that you don’t delete them.

You have nothing to worry about. These files do nothing except store the names of files and subdirectories within the same directory. If the file is in a directory on your Web host’s machine, then the file isn’t going to contain anything except information (specifically, filenames) about the files in that directory. I opened up a .DS_store file on my own Mac OS X machine, and all it contained was file names and directory names.

I upload to my own Web host via FTP using either Interarchy or Dreamweaver. None of my local .DS_store files have made it to my Web host. Yes, I can see invisible files on my Web server - for example, I can see my .htaccess file.

Is your site hosted on a Mac OS X machine? If so, then it is probably the server generating these files.

No–it’s hosted on an NT machine. The files were likely generated by one of my Macs at home (one has OSX, the other, which I use more frequently, does not; I must have had the folder on the OSX machine at one point…) and passed on.

Thanks for the link, Bytegeist. It did note this:

I did see this option, but I thought it would simply ignore such files–i.e. not ignore them as in don’t upload them, but ignore them as in pretend you can’t see them … which it’s doing just fine as is. I guess I’ll give that a shot to prevent future contamination, and just lock all users out of the already diseased directories for all time.

I don’t use Fetch but Interarchy, which has a “send raw FTP command” – you could try using it to delete the file.

Better yet, FTP from the terminal, and you can do FTP the old fashioned way.

What probably happened is you uploaded an entire folder, and Mac OS X has these files in virtually every folder.

Another idea is to see if your web host allows ssh access. There’s a lot of good reasons for being able to do this, but for now it’ll let you erase the files. The thing is, though, I don’t know anything about NT servers so I don’t know if you’d get a DOS shell or a Unix-compatible shell…