Greg Helledy on 5 Jul 2016 12:42:25 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Undeletable file, how to get rid of it?


A user found they couldn't delete a directory on their FTP account and called me for help, thinking their permissions had been changed. It turns out that the reason is there's a file they uploaded that the OS can't delete. The FTP server is running on linux; the user's FTP directory is stored on a separate NAS device on the LAN. It is mounted with cifs at boot.

I've searched for help on this but answers provided seem to focus on the case where the filename has spaces or other embedded non-visible characters. In that case, using Midnight Commander or another program that lets you select and delete the file, works.

I cannot.  MC says "Cannot stat [filename]  No such file or directory (2)"

If I type "rm" and the first character of the filename and hit tab, the system brings up the rest of the filename properly. If I then hit enter, I get:
rm: cannot remove ‘filename’: No such file or directory

This result was unexpected, I don't know what that means:
touch: cannot touch ‘filename’: No such file or directory

How do I delete a file like this, that's simultaneously there and not there? Is there any way to prevent this from recurring?

--
Greg Helledy
GRA, Incorporated
P:  +1 215-884-7500
F:  +1 215-884-1385
www.gra.aero
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug