Permissions problems [solved]

I’ve just uninstalled vn 5.0.36 of Virtualbox, and installed vn 5.1.18. At least I think I have… However, when I use the ‘search your computer’ feature in Ubuntu 16.04, it still seems to find the old version, although it says it’s installed ‘nowhere’.

Confused? Me too, but it gets better, or rather, worse.

Immediately after installing the new version I was able to add a VM from the previous version, start it, use it and suspend it while I went out to the Co-Op (I live life in the fast lane…)

Now I open Virtualbox to find the welcome screen and no existing VMs. What’s more, I can’t add the same VM again. I get the following message…

Runtime error opening ‘/home/mike/VirtualBox VMs/XP/XP.vbox’ for reading: -38(Access denied.).
/home/vbox/vbox-5.1.18/src/VBox/Main/src-server/MachineImpl.cpp[485] (nsresult Machine::initFromSettings(VirtualBox*, const com::Utf8Str&, const com::Guid*)).

Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
MachineWrap
Interface:
IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}
Callee:
IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}

I’ve tried moving the VM to my home folder in case that helped, but Ubuntu tells me I don’t own it, so I can’t move it.

I’m the only user of this PC and I created the old VM, so how can I not be the owner?

As always, thanks in advance for any/all help…

What’s the output from

dpkg -l | grep virtualbox

and

ls -l "/home/mike/VirtualBox VMs"

and

ls -l "/home/mike/VirtualBox VMs/XP"

?

Outputs below Mark,

mike@mike-ubuntu:~$ dpkg -l | grep virtualbox
ii unity-scope-virtualbox 0.1+13.10.20130723-0ubuntu1 all VirtualBox scope for Unity
ii virtualbox-5.1 5.1.18-114002~Ubuntu~xenial amd64 Oracle VM VirtualBox
mike@mike-ubuntu:~$ ls -l “/home/mike/VirtualBox VMs”
total 4
drwxrwxr-x 4 mike mike 4096 Apr 16 17:40 XP
mike@mike-ubuntu:~$ ls -l “/home/mike/VirtualBox VMs/XP”
total 10485824
drwx------ 2 mike mike 4096 Apr 16 17:37 Logs
drwx------ 2 mike mike 4096 Apr 16 17:37 Snapshots
-rw------- 1 root root 3083 Apr 16 17:40 XP.vbox
-rw------- 1 root root 3083 Apr 16 17:37 XP.vbox-prev
-rw------- 1 mike mike 10739515392 Apr 16 17:40 XP.vdi
mike@mike-ubuntu:~$ ^C
mike@mike-ubuntu:~$

As far as I can tell from this, the new version is the only one installed and I have read, write permissions to the VM, but root owns it…

Try this…

Open a terminal and run:

sudo chown -R mike:mike "/home/mike/VirtualBox VMs/XP"

Now see if you can start the XP VM ?

If not, post the output from:

ls -l "/home/mike/VirtualBox VMs/XP

again

Thanks Mark,

The change of ownership seems to have worked. The VM now appears in the Virtualbox list of VMs and I can start it.

Next step is to create another VM and see who the owner is… I’ll try that in the next couple of days. I’ll wait till then to mark this thread solved, although I think it is.

Thanks again.

PS: I’m now starting to read resources about the command line. Bit like learning DOS all over again… Happy days. Then along came Windows 3.1…

You’re welcome Mike … If I had to guess, I’d guess you copied the VM from another machine and did it with elevated privileges ?

Or you somehow started Vbox with elevated privileges when you first ran that VM ?

Everything seems to be working ok now. I created a new VM and the owner was ‘me’.

The old VM works as does a clone I made of it.

I didn’t copy from another machine, and the only way I can think I was running with elevated privileges would be if I’d elevated them to do updates immediately before creating the old VM. Is that even plausible?

Thanks Mark. I’ll make this solved now…

PS: the weird thing is still that when I use the ‘search your computer’ feature it finds only the old version. Although it says it’s installed ‘nowhere’, I still have the uninstall option available…