Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Dec 18 '12 at 17:46

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

1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.