With every new release the way to automount USB drives in Linux seems to change (fortunately I'm using Debian, so I'm only losing a few days on this every 2 years). We used to have usbmount, udisks, udisks2, udisks-glue, pmount, custom udev rules, and I'm probably forgetting many more. (A quick look shows that at least a thing named afuse
seems to exist, but is not documented too well). None of these work anymore (for me at least).
What is the "current" way to automount USB drives in Debian? I used the following udev
rule, but since updating from stretch to buster this stopped working:
SUBSYSTEM=="usb", DRIVERS=="usb-storage", ACTION=="add", \
RUN+="mkdir /media/usb%n; mount -o gid=plugdev,umask=002,fmask=111,users /dev/%k%n /media/usb%n"
Also: what is the stable solution to do this, that will reliably work even after updating to a new release, that I probably missed?