The default mount options (such as the default umask) seem to be hardcoded in the binary of the udisks daemon. It would be more helpful to put them into a configuration file (e.g., under /etc), so admins can edit them. I know that the defaults can be overwritten with the command-line option --mount-options. But that option has to be given every time udisks is called, which is very tedious. And if udisks is called by another program (such as KDE's device notifier), one has to edit that program. Editing a config file would be a much cleaner way of setting custom defaults.
There have been requests to do this from several people so I think we should do it. We should do this through udev rules so you can e.g. write # Set mount options on all partitions of a particular disk SUBSYSTEM=="block", ENV{ID_SERIAL}=="WDC_WD1002FAEX-00Y9A0_WD-WCAW30039835", ENV{UDISKS_MOUNT_OPTIONS}="defaults,ro,noexec" # Set mount options for all VFAT filesystems on USB devices SUBSYSTEM=="block", SUBSYSTEMS=="usb", ENV{ID_FSTYPE}=="vfat", ENV{UDISKS_MOUNT_OPTIONS}="defaults,flush" The semantics should be that if UDISKS_MOUNT_OPTIONS, then the @options parameter in the Filesystem.Mount() D-Bus method [1] should be ignored. We also need to document the UDISKS_MOUNT_OPTIONS property in the udisks(8) man page [2]. I think there's a couple of existing bugs for this - I'll look and close as duplicate. [1] : http://udisks.freedesktop.org/docs/latest/gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Mount [2] : http://udisks.freedesktop.org/docs/latest/udisks.8.html
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.