I am trying to use VirtualBox which worked just a week ago (I haven’t changed anything with it) but now it fails. When I try to start it (from the command line) with /usr/bin/VirtualBox, as a regular user, it fails with:
/usr/bin/VirtualBox: line 72: /usr/lib/virtualbox/VirtualBox: Permission denied
/usr/bin/VirtualBox: line 72: exec: /usr/lib/virtualbox/VirtualBox: cannot execute: Permission denied
I was able to get it to work but only with two changes:
chmod +x
recompile for the kernel with “/etc/init.d/vboxdrv setup”
I know why I had to do step #2, but why step 1? I never touched Virtual Box and certainly never changed the permissions and it worked the last time I used it. Why/how would the permissions on it change?
chmod +x “nothing” does not do anything. You need to be a member of vboxusers, as you see they can already execute Virtualbox: -rwsr–x
The second part is what’s done it: you probably updated your kernel. Vbox kernel module then needs rebuilding against the new kernel, that’s what you did with the second action.
Um, I think you misunderstood me. I didn’t do chmod +x without a file name, I did:
sudo chmod +x /usr/lib/virtualbox/VirtualBox
THAT enabled VirtualBox to run, which then gave the kernel error. I know why the kernel one occurred, my point was that it couldn’t even get to that because of the permission issue, but there was no permission issue a week ago - the last time I ran it! Why did the permissions change? (Or the permission req’s?)
The second step is NOT what enabled it to run. I could not even GET to that error (telling me I needed to “/etc/init.d/vboxdrv setup”) until I did the chmod.
Maybe are not really in the group vboxusers? Because these are the permissions on my VirtualBox binary and as you can see, no world execute permission is needed and it works fine for me.
recompile the kernel module after eack kernel update with : /etc/init.d/vboxdrv setup
be member of the vboxusers group
if several members of this group (including root) access your virtual machines, regularly restore the permissions with:
find /srv/vbox -type d -exec chmod 775 “{}” “;” -exec chown “root:vboxusers” “{}” “;” ; find /srv/vbox -type f -exec chmod 664 “{}” “;” -exec chown “root:vboxusers” “{}” “;”’
where /srv/vbox in this example is the directory where vbox virtual machines are stored.
This just happened to me too. I was running VirtualBox, shut down my vm to modify network settings. I tried to start the vm again and got a permission denied error trying to start a process. I closed VirtualBox and tried to restart it but got a permission denied error.