Jason Plum on 5 Jul 2016 12:45:12 -0700


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

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


If (big if), ls can show the inode, you can delete by the inode. Otherwise, keep trying with the appropriate escaping

http://www.cyberciti.biz/tips/delete-remove-files-with-inode-number.html

Jason Plum
WarheadsSE

On Tue, Jul 5, 2016 at 3:42 PM, Greg Helledy <gregsonh@gra-inc.com> wrote:
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

___________________________________________________________________________
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