Open trislett opened 6 years ago
this is likely because you do not have windows_machine.qcow2 in a directory the snap can access, by default your home is connected, i could additionally add the removable-media interface which would additionally allow you to access /media (and soon also /mnt) ... as a workaround you can try to bind mount the windows_machine.qcow2 file or the dir it lives in into your homedir
The windows_machine.qcow2 image is located on an internal hard drive that snap should be able to access. I tried to binding the directory containing windows_machine.qcow2 to my home directory, and I've received the same error. i.e.,
qemu-system-x86_64: -drive file=/home/tris/nonraid/windows_machine.qcow2,index=0,media=disk,if=virtio,l2-cache-size=13107200: Could not open '/home/tris/nonraid/windows_machine.qcow2': Permission denied
by default snap can only access three dirs /snap/<snapname>/current/
, /var/snap/<snapname>/current/
, ~/snap/<snapname>/current/
... if the home interface is used by a snap (like this one), you also get access to all non-hidden files in your home ... it does not make any difference if your file is on an internal disk here if it is not accessible through one of these directories.
the bind-mount (note that apparmor will also block symlinks for security reasons, it needs to be an actual bind mount) should definitely work if you have proper read permissions for the file ... do you ?
I'm running into the following permission issue:
qemu-system-x86_64: -drive file=windows_machine.qcow2,index=0,media=disk,if=virtio,l2-cache-size=13107200: Could not open 'windows_machine.qcow2': Permission denied
I get the error on both stable and edge distributions. The hd image works fine running the qemu-system-x86_54 version 2.5.0.