Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to mount external USB drives #23

Open
tortugaverde98 opened this issue Jun 18, 2018 · 7 comments
Open

Unable to mount external USB drives #23

tortugaverde98 opened this issue Jun 18, 2018 · 7 comments

Comments

@tortugaverde98
Copy link

From an appvm with a hardened template, unable to mount an external usb thumbdrive.
Nautilus/Files shows it is present, but once clicked on to mount, error pops up: Unable to access location, not authorized to perform action.

From Disks, error is "Error mounting filesystem" Not authorized to perform operation (udisks-error-quart, 4).
I realize it's possible to mount it via a root xterm from dom0, but is there something that can be whitelisted or something to allow USBs to be mounted as normal?

@tasket
Copy link
Owner

tasket commented Jun 18, 2018

@tortugaverde98 Is the thumbdrive encrypted? This advice may apply:

https://askubuntu.com/questions/399768/encrypted-disk-wont-unlock-anymore-not-authorized-to-perform-operation-udisks#751769

The udisksctl command could be a convenient workaround, but a possible solution may be hinted at in the answer mentioning polkit (polkit-gnome in this case).

@tortugaverde98
Copy link
Author

It is not encrypted, and the filesystem is fat32. I have two identical templates (fedora 28), and the only difference between them is that one has been hardened and passwordless root removed, but all the other qubes agents reinstalled, including polkit.
The thumbdrive mounts fine in the non-hardened, but not in the hardened.

Something needs to be whitelisted so the hardening script allows it to mount.

@tortugaverde98
Copy link
Author

Attempting to gather more specifics, I ran the command below with the resulting response. Are there any workarounds that don't involve running a dom0 root xterm?:

$ udisksctl mount -b /dev/xvdi1
==== AUTHENTICATING FOR org.freedesktop.udisks2.filesystem-mount-system ====
Authentication is required to mount /dev/xvdi1
Authenticating as: root
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ====
Error mounting /dev/xvdi1: GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorized: Not authorized to perform operation

@tasket
Copy link
Owner

tasket commented Jun 18, 2018

This looks like an upstream Qubes issue.

Without vm-boot-protect present I can reproduce the behavior by first following the Qubes vm-sudo doc. Same result if I remove the qubes-core-agent-passwordless-root package. Likewise, installing nautilus in a fedora-minimal template and trying to use it to mount disks should lead to the same auth failure because that template doesn't come with passwordless-root installed.

There may still be some mechanism by which nautilus can mount volumes in an auth-restricted VM. For instance if some setting or policy makes nautilus use sudo, then a VM configured for sudo prompts should trigger a dom0 auth prompt before successfully running mount. Also, this suid method might work.

@tasket
Copy link
Owner

tasket commented Jun 18, 2018

@tortugaverde98
Copy link
Author

To clarify, it is required to remove passwordless root on fedora templates, correct?

@tortugaverde98
Copy link
Author

Attempting on a debian minimal template, with the same result. Any suggestions to get this going?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants