Skip to content

Instantly share code, notes, and snippets.

@Scrumplex
Last active November 9, 2025 20:43
Show Gist options
  • Select an option

  • Save Scrumplex/8f528c1f63b5f4bfabe14b0804adaba7 to your computer and use it in GitHub Desktop.

Select an option

Save Scrumplex/8f528c1f63b5f4bfabe14b0804adaba7 to your computer and use it in GitHub Desktop.

Revisions

  1. Scrumplex revised this gist May 6, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions 50-udisks.rules
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    // Original rules: https://github.com/coldfix/udiskie/wiki/Permissions
    // Changes: Added org.freedesktop.udisks2.filesystem-mount-system, as this is used by Dolphin.

    polkit.addRule(function(action, subject) {
    var YES = polkit.Result.YES;
    // NOTE: there must be a comma at the end of each line except for the last:
  2. Scrumplex revised this gist May 6, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion 50-udisks.rules
    Original file line number Diff line number Diff line change
    @@ -9,10 +9,11 @@ polkit.addRule(function(action, subject) {
    "org.freedesktop.udisks.drive-detach": YES,
    // required for udisks2:
    "org.freedesktop.udisks2.filesystem-mount": YES,
    "org.freedesktop.udisks2.filesystem-mount-system": YES,
    "org.freedesktop.udisks2.encrypted-unlock": YES,
    "org.freedesktop.udisks2.eject-media": YES,
    "org.freedesktop.udisks2.power-off-drive": YES,
    // Dolphin specific
    "org.freedesktop.udisks2.filesystem-mount-system": YES,
    // required for udisks2 if using udiskie from another seat (e.g. systemd):
    "org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
    "org.freedesktop.udisks2.filesystem-unmount-others": YES,
  3. Scrumplex created this gist May 6, 2018.
    26 changes: 26 additions & 0 deletions 50-udisks.rules
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    polkit.addRule(function(action, subject) {
    var YES = polkit.Result.YES;
    // NOTE: there must be a comma at the end of each line except for the last:
    var permission = {
    // required for udisks1:
    "org.freedesktop.udisks.filesystem-mount": YES,
    "org.freedesktop.udisks.luks-unlock": YES,
    "org.freedesktop.udisks.drive-eject": YES,
    "org.freedesktop.udisks.drive-detach": YES,
    // required for udisks2:
    "org.freedesktop.udisks2.filesystem-mount": YES,
    "org.freedesktop.udisks2.filesystem-mount-system": YES,
    "org.freedesktop.udisks2.encrypted-unlock": YES,
    "org.freedesktop.udisks2.eject-media": YES,
    "org.freedesktop.udisks2.power-off-drive": YES,
    // required for udisks2 if using udiskie from another seat (e.g. systemd):
    "org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
    "org.freedesktop.udisks2.filesystem-unmount-others": YES,
    "org.freedesktop.udisks2.encrypted-unlock-other-seat": YES,
    "org.freedesktop.udisks2.eject-media-other-seat": YES,
    "org.freedesktop.udisks2.power-off-drive-other-seat": YES
    };
    if (subject.isInGroup("storage")) {
    return permission[action.id];
    }
    });