I gave my USB stick to a friend of mine to put a movie on it. When he returned it to me he said that some strange files are generating whenever he mounts a drive and he can't delete them afterwards. He's on Windows so I thought probably a virus of some kind, shouldn't be hard to delete on Ubutnu. WRONG!
I tried the normal way, didn't work, got the error:
"Error removing file: Read-only file system"
Tried to change the permissions on the file, got the error:
"Error setting permissions: Read-only file system"
Tried with sudo power got the same errors.
Here's a screenshot of all that:
http://img121.imageshack.us/img121/110/screenshoteu.png
Those file that are not in the folders are the troubling ones.
How can I remove those? Help meh please
Error while trying to delete files from USB drive
- computathug
- Administrator
- Posts: 2693
- Joined: 29 Mar 2007, 16:00
- 17
- Location: UK
- Contact:
Was the USB Pen Drive taken out of the windows box without using the "safely remove hardware" option. There is a good chance it has. Try reinserting the drive into a windows PC and removing with the correct procedure and then try again.
The devil can cite Scripture for his purpose.
-- William Shakespeare, "The Merchant of Venice"
https://tshirt-memes.com
-- William Shakespeare, "The Merchant of Venice"
https://tshirt-memes.com
I plugged it in my windows box, turned on my AV just in case if it is a virus, but it didn't detect anything. Surprisingly a format did work, so I'm guessing it was like you said thug. But I don't understand why because I unplugged the USB countless times in countless places without the Safe Removal and the USB stick is also configured that way:
and this never happened before...
Anyway, thanks for the help thugs
and this never happened before...
Anyway, thanks for the help thugs
- Lundis
- Distorter of Reality
- Posts: 543
- Joined: 22 Aug 2008, 16:00
- 15
- Location: Deadlock of Awesome
- Contact:
As you said it was mounted as read-only, you would have had to mount it manually with
the options (-o) are rw (readwrite) and force, which ignores things like "unsafely removed"-related errors.
Code: Select all
mount -t vfat -o rw,force /dev/USBDEVICE /directory/of/choice