Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some trouble in Ubuntu 10.

When I start to copy a file to my flash-drive and then during the copy operation I remove my flash-drive I get an error, as expected.

Then I plug my flash again and try to delete the half-copied file - it removes it correctly, but my flash-drive gets locked (read-only) so I can't save/delete anything on it until I unplug and plug my flash back in.

sudo mount -o remount,rw blabla - works fine too, removing the lock.

How can I fix it so that the disk does not get locked when remove the half-copied file?

share|improve this question

migrated from Dec 18 '12 at 17:46

This question came from our site for professional and enthusiast programmers.

Why is it a good idea to remove a flash drive while it's being written to? Do you like corrupted file systems? – Fiasco Labs Dec 18 '12 at 18:44
I know its bad idea, i am designing some software and i need to prevent this mistake if user will remove flash drive. – Dmitry Antonenko Dec 19 '12 at 14:52
Oh, dealing with recovering from customer misuse. Understandable. – Fiasco Labs Dec 19 '12 at 15:58

You must log in to answer this question.

Browse other questions tagged .