Unable to delete or rename a folder


#1

Hi there,
I have a strange issue with a directory.

OS = Mint 18.3 MATE.

There is a directory on an external drive that is exhibiting strange behaviour. I can go into it, make files there, which then exist and behave as expected, but can’t delete, rename, or move the directory…

Attempting to delete, rename, or move it gives me a “No such file or directory” error.

The permissions are 777 according to the terminal and I’m using sudo when trying to manipulate it, just to be sure.
chown and chmod fail silently (as root), in that no error is thrown but no changes are made to the directory.

Any ideas?


#2

It might be the drive is failing and this is an early sign of it - I don’t know if any of the answers here, particularly the last one will help or not : https://forums.linuxmint.com/viewtopic.php?t=183363


#3

is this the only directory in which the situation occurs?


#4

If you use NTFS within Linux, I advise you to stop. NTFS is reverse-engineered for Linux and doesn’t work well with this OS, at all. The behaviour as you describe it is typical for an error regarding the file system. Last time Linux created a hard link on my NTFS drive, without me knowing, I had to completely reformat the whole disk.


#5

Yes, it is the only situation,
and yes it is NTFS. I was wondering if that was the issue.
Problem being it needs to be NTFS as being an external HDD it is used with both Linux and Windows.

Oh well, when it gets annoying enough then I’ll just copy everything off that I want to keep and reformat the thing.

Thanks for the help.


#6

I use an external NTFS drive as well in-between OSes. But I very strictly avoid letting Linux do anything else than generic write/read operations on that drive. No symlinks, no hard links, not even setting permissions, so nothing special allowed. Then everything works.


#7

Freddy do still have Windows on - if so you can repair it via windows - I had a similar problem and used windows to repair the external drive and once it had done that I just copied the folders I needed onto Mint and they all opened okay. Refomating seems a bit drastic to my thinking.


#8

i have a couple ntfs usb drives that i am using to work on mom’s windows 7 hp. i didn’t realize there would be some transfer issues and was a bit surprised until i read this. makes sense. my wd passport mounts an unmounts just fine, but the usb’s have been throwing all kinds of syslog errors. this helps me understand that a little better. thanks


#9

Well, in this specific case there might be an additional issue. Many people don’t realize that thumb drives are made out of NAND chips that are of too bad quality for anything else. Basically, any chips that are thrown away during SSD creation, etc. are put into the thumb drive basket and that’s where thumb drives are born. To get a high quality thumb drive, you probably need to pay like 3 times the price you would usually expect for each size respectively. But even then, it’s just the high quality crap. So basically the crap that gets thrown away when high quality SSDs etc. are created. Therefore thumb drives aren’t generally a good storage for the most important data. Either put the data on several thumb drives simultaneously or make sure you back it up somewhere else, too.

That said, are you sure they are formatted as NTFS and not FAT32?


#10

in general i just use the usb’s for quick transfers between computers. any long term or more valuable info lives on my wd passport.

of the two usb’s i was using recently (one died yesterday), i know the living one is ntfs. i also used an ntfs partition on an older hdd in an enclosure to transfer some files. each of those yielded some that were inaccessible. not really a big deal. mostly family photos and fluff of which 99% made it to the intended destination. i was just a bit perplexed until i read your comment about ntfs and linux.


#11

I sometimes have this issue with Cinnamon, especially difficult when needing to delete large files ( e.g. in Timeshift ). What helps is to go into root user mode, then have lots of patience as things can then happen, but very slowly.


#12

If you try to rename it or delete it, what error do you get?

If you cd above the dir, and do lsattr , what does it show?


#13

Oh yeah, I didn’t think of trying that… Went ahead with the format and am now going to be careful how I use the drive when running Mint.


#14

Attempting to delete, rename, or move it gives me a “No such file or directory” error.

It’s gone now as I reformatted in the end. If another one pops up I’ll post the results of an lsattr.