On Sat 30 Mar 2024 at 21:06:27 (+0200), Antti-Pekka Känsälä wrote: > I was able to replicate this, by trying to send gmail to myself in Firefox, > attaching a binary on a mounted USB stick.
Did you mount the stick yourself as a user (ie there's an fstab entry for it), or as root, or does an automounter mount it for you? > After the attachment supposedly > was uploaded, I tried to unmount the stick, but it blocks. "lsof | grep -i > KINGSTON" then shows a total of 129 lines from "x-www-browser". This lasted > for about a minute, then the drive unmounted by itself. This is the behaviour I see, where (1) inserting a stick creates a mountpoint and (2) that mountpoint is referenced in /etc/fstab: After typing Ctrl-O in Firefox, I navigate to /media/foo (the mountpoint that was created). Double-clicking on the directory mounts it and displays the files in it. Opening a text file displays it. At least for a small file, FF does not hold the file open, so I can immediately unmount the stick. That may differ if, for example, a mail MUA or MTA is taking a lot of time to process an attached file. So I suspect you may be relying on an automounter to mount the stick, and you have to wait for a period of inactivity to time out before it decides you've probably finished with it. Cheers, David.