Error while trying to delete files from USB drive

Don´t be shy, Linux is fun! =)
Post Reply
User avatar
ph0bYx
Staff Member
Staff Member
Posts: 2039
Joined: 22 Sep 2008, 16:00
15
Contact:

Error while trying to delete files from USB drive

Post by ph0bYx »

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 :(

User avatar
computathug
Administrator
Administrator
Posts: 2693
Joined: 29 Mar 2007, 16:00
17
Location: UK
Contact:

Post by computathug »

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

User avatar
ph0bYx
Staff Member
Staff Member
Posts: 2039
Joined: 22 Sep 2008, 16:00
15
Contact:

Post by ph0bYx »

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:

Image

and this never happened before...

Anyway, thanks for the help thugs *thumb*

User avatar
Lundis
Distorter of Reality
Distorter of Reality
Posts: 543
Joined: 22 Aug 2008, 16:00
15
Location: Deadlock of Awesome
Contact:

Post by Lundis »

As you said it was mounted as read-only, you would have had to mount it manually with

Code: Select all

mount -t vfat -o rw,force /dev/USBDEVICE /directory/of/choice
the options (-o) are rw (readwrite) and force, which ignores things like "unsafely removed"-related errors.

Post Reply