On Debian, when automounted, all files and directories in USB drives have 777 permissions. I don't like it very much. I know a bit of udev rules, and I think I could write a rule of mine to override the default behaviour. But I also would like to know which system rules are involved in this mechanism, can you help me?
Thanks in advance.
usbmount
allows you to specify permissions and owner/group of mounted FAT filesystems in the configuration, IIRC. And yes, it uses udev rules, so you don't have to write those yourself.