1. Byron Clark
  2. udiskie
  3. Issues
Issue #15 resolved

Add configuration for certain devices

Ben Boeckel
created an issue

It would be nice to be able to have settings for specific devices. I have a USB key with SSH keys and such that is currently mounted via autofs. In order to get the same out of udisks, I need to be able to specify that the device with UUID=… gets mounted at a specific location so that symlinks and such work properly. I also usually mount random USB keys with the nodev and noexec flags to help guard against random devices, so setting those would be nice as well.

Comments (9)

  1. Anonymous

    Hrm. Seems that the mount path is arbitrary looking at the DBus docs. I still think that per-device options would be nice (if filters were possible[1], it would also fix Issue #12).

    [1]Maybe:

    fstype=ntfs: uid=1000,gid=1000
    uuid=…: …
    media=optical: …
    
  2. Byron Clark repo owner

    After playing with udisks, it looks like the uid and gid options are set by default for ntfs, vfat, iso9660, and udf. Unfortunately, udisks only allows those options to be set to the current user's uid and gid. That said, this would definitely still be useful, especially for the nodev and noexec flags. I'm not completely sold on the syntax for the filters, but I haven't come up with anything better than your proposal.

  3. Byron Clark repo owner

    Added filters for mount options.

    Implemented basic filters for mount options. Right now it only reads filters out of a file called filters.conf in the directory where udiskie is run. The format looks like this: [mount_options] fstype.vfat: sync,nodev uuid.9d53-13ba: noexec

    refs #15

    320f3ec88019

  4. Byron Clark repo owner

    Remaining work to resolve this:

    • Read from XDG_CONFIG/udiskie/filters.conf by default
    • Add a command line options to specify other filter files
    • Document the filters format
  5. Log in to comment