Bug 36155

Summary: no way to provide own default options on mount removable drives
Product: Sisyphus Reporter: nbr <nbr>
Component: udisks2Assignee: Yuri N. Sedunov <aris>
Status: NEW --- QA Contact: qa-sisyphus
Severity: enhancement    
Priority: P3 CC: aen, aris, boyarsh, nbr
Version: unstable   
Hardware: all   
OS: Linux   

Description nbr 2019-02-22 10:07:56 MSK
It is no way to make own default options, like "noexec" on removable mounts
handled by udisks2.
A stackoverflow discussion is here:
https://unix.stackexchange.com/questions/155567/mounting-removable-usb-disks-with-nodev-noexec-nosuid
Is it possible to have at least our own distribution patches for handling this problem?
Comment 1 Yuri N. Sedunov 2019-02-22 11:43:23 MSK
https://github.com/storaged-project/udisks/issues/609
Comment 2 AEN 2019-02-22 14:29:44 MSK
Нам это очень нужно для сертификации и потому прямщаз.
Comment 3 Yuri N. Sedunov 2019-02-23 12:45:11 MSK
(В ответ на комментарий №2)
> Нам это очень нужно для сертификации и потому прямщаз.
А что нужно то?

$ udisksctl mount --help
Usage:
  udisksctl mount [OPTION?]

Mount a filesystem.

Options:
  -p, --object-path         Object to mount
  -b, --block-device        Block device to mount
  -t, --filesystem-type     Filesystem type to use
  -o, --options             Mount options
  --no-user-interaction     Do not authenticate the user if needed

Видим, что, например, один из клиентов udisksd -- udisksctl умеет "mount options", сам udisksd умеет читать опции монтирования из fstab и из файлов конфигурации, см. man 8 udisks.

 DRIVE CONFIGURATION
       At start-up and when a drive is connected, udisksd(8) will apply configuration stored in the file
       /etc/udisks2/IDENTIFIER.conf where IDENTIFIER is the value of the Drive:Id property for the drive. If the file
       changes on disk its new contents will also be applied to the drive. Typically, users or administrators will never
       need to edit drive configuration files as they are effectively managed through graphical applications such as
       gnome-disks(1). Manually editing configuration files is however supported — the file format is a simple .ini-like
       format (see the Desktop Entry Specification[3] for the exact syntax). New groups and keys may be added in the
       future.

Если хочется чего-то особенного, просьба внимательно прочитать 
отсюда: https://lists.freedesktop.org/archives/devkit-devel/2015-April/001668.html
до конца нити и конкретно сформулировать задачу.