You are not logged in.

#1 2020-06-26 22:31:33

Svinto
Member
Registered: 2012-01-15
Posts: 16

Why can't user nobody access storage mounted with udisks?

I'm trying to use Virt-Manager to create and start a new VM. I want this VM to be stored on a usb storage (since my system storage is almost full). The USB storage is automounted with udiskie (which uses udisks).

Virt-Manager throws the following error:

Unable to complete install: 'Cannot access storage file '/run/media/svintoo/Sekitan/VM/win7.qcow2' (as uid:65534, gid:992): Permission denied'

The uid 65534 refers to the user nobody on my system. And I fail to understand why this user can't access my USB storage.

Here is some test output where user nobody can access folders in my home folder:

[svintoo@kurodani VM]$ pwd
/home/svintoo/VM
[svintoo@kurodani VM]$ sudo -u nobody /usr/bin/ls
archlinux-2020.03.01-x86_64.iso  Win10_1909_English_x64.iso
[svintoo@kurodani VM]$ sudo -u nobody /usr/bin/ls /home/svintoo/VM/
archlinux-2020.03.01-x86_64.iso  Win10_1909_English_x64.iso
[svintoo@kurodani VM]$ 
[svintoo@kurodani VM]$ 
[svintoo@kurodani VM]$ ll -d /home/ /home/svintoo/ /home/svintoo/VM/
Permissions Size User    Group   Date Modified    Name
drwxr-xr-x     - root    root    2020-02-25 01:12 /home
drwx--x---@    - svintoo svintoo 2020-06-26 23:16 /home/svintoo
drwxr-xr-x     - svintoo svintoo 2020-05-24 18:21 /home/svintoo/VM

And here when user nobody fails to access the USB storage:

[svintoo@kurodani VM]$ pwd
/var/run/media/svintoo/Sekitan/VM
[svintoo@kurodani VM]$ sudo -u nobody /usr/bin/ls
win7_pro_sp1_x64_20150415.iso  win7.qcow2
[svintoo@kurodani VM]$ sudo -u nobody /usr/bin/ls /var/run/media/svintoo/Sekitan/VM
/usr/bin/ls: cannot access '/var/run/media/svintoo/Sekitan/VM': Permission denied
[svintoo@kurodani VM]$ 
[svintoo@kurodani VM]$ ll -d /var/ /var/run/ /var/run/media/ /var/run/media/svintoo/ /var/run/media/svintoo/Sekitan/ /var/run/media/svintoo/Sekitan/VM/
Permissions Size User    Group   Date Modified    Name
drwxr-xr-x     - root    root    2020-06-26 23:16 /var
drwxr-xr-x     - root    root    2020-06-27 00:18 /var/run
drwxr-xr-x     - root    root    2020-06-26 23:16 /var/run/media
drwxr-x---@    - root    root    2020-06-26 23:16 /var/run/media/svintoo
drwxrwxrwx     - svintoo users   2020-06-06 21:56 /var/run/media/svintoo/Sekitan
drwxrwxrwx     - svintoo svintoo 2020-06-26 23:40 /var/run/media/svintoo/Sekitan/VM

Both directories (in home folder and in USB storage) have similar permissions. So why can user nobody access folders in my home directory, but not in my USB storage?

Any suggestions in how to troubleshoot this problem are very much appreciated.

Note: I'm fully aware that I can probably solve this problem by mounting the disks manually to /mnt or similar. This is less an "help me get it to work" question and more of a "help me understand why this happens" question.

Offline

#2 2020-06-29 10:51:56

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 246

Re: Why can't user nobody access storage mounted with udisks?

Look here:

drwxr-x---@    - root    root    2020-06-26 23:16 /var/run/media/svintoo

User nobody has no permission to execute this folder so it can't enter below.

Last edited by Abaddon (2020-06-29 10:52:06)


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

Board footer

Powered by FluxBB