> > There’s a solution, actually… > > CRON that runs every minute… it executes a file, deletes the file, touches the file, changes it permissions. > Absolutely no guarantees on data integrity... Modifying the filesystem can take an arbitrary amount of time, at which time the user can yank out the USB, which is something they can do at anytime, etc, etc. Maybe we need to think "out of the box" here, as I was discussing with a friend about this offline. Do it like ATMs, where they take your card, do what there is to do, and return it in the end. Have the USB behind a "hatch" that opens when the drive is to be attached. Then close it... You get the idea. You open the hatch to let the user unplug it after you have successfully unmounted. For safety, you can introduce a forced ejection by the user, should they think that the process is taking too long, but after they have been warned of the potential issues.