Dunno if this is specific to Qubes or not, but without passwordless root installed, when I try to mount attached usb partition, ie with udisksctl mount -b /dev/xvdi
command, it returns
Error mounting /dev/xvdi: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error mounting system-managed device /dev/xvdi: Unknown error when mounting /mnt/removable
Internet search doesn’t seem to return any udisks2 errors with Unknown
message, so I thought maybe this is qubes specific.
Error message reproduced on fedora-minimal and full fedora. I should mention that if you attach the whole usb device to the fedora-minimal based vm, then it can be attached in thunar without any problems. Problem is only with the attached partition.
So far I tried changing polkit permissions in /etc/polkit-1/rules.d/50-udiskie.rules
as follows
polkit.addRule(function(action, subject) {
var YES = polkit.Result.YES;
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.encrypted-unlock": YES,
"org.freedesktop.udisks2.eject-media": YES,
"org.freedesktop.udisks2.power-off-drive": YES
};
if (subject.isInGroup("user")) {
return permission[action.id];
}
});
and in /etc/polkit-1/rules.d/allow-mount-internal.rules
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
action.id == "org.freedesktop.udisks.filesystem-mount-system-internal") &&
subject.local && subject.active && subject.isInGroup("user"))
{
return polkit.Result.YES;
}
});
As far as I can see this should work - user is a part of group user
- or am I missing something?
Wouldn’t want to install passwordless root just to be able to mount a usb partition…