Ubuntu – Cannot access the file: Permission denied – Virtualbox

administratorsoftware installationvirtualbox

I have downloaded Virtualbox in order to run Android in it I have set up everything and tried to start it but unfortunately 2 errors have came up.

  1. Failed to open a session for the virtual machine Android.
    The virtual machine 'Android' has terminated unexpectedly during startup with exit code 1

    Details:

    Result Code: 
    NS_ERROR_FAILURE (0x80004005)
    Component: 
    Machine
    Interface: 
    IMachine {480cf695-2d8d-4256-9c7c-cce4184fa048}
    
  2. Kernel driver not installed (rc=-1908)

    The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

    /etc/init.d/vboxdrv setup
    

    as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

    So it typed in the /etc/init.d/vboxdrv setup into the terminal and that's what came up:

    /etc/init.d/vboxdrv setup
    Stopping VirtualBox kernel modules ...done.
    Recompiling VirtualBox kernel modules
    /etc/init.d/vboxdrv: 334: 
    /etc/init.d/vboxdrv: cannot create /var/log/vbox-install.log: Permission denied
     ...failed!
      (Look at /var/log/vbox-install.log to find out what went wrong)
    

    After that as it was saying in the terminal I typed in /var/log/vbox-install.log to check out what went wrong.

    /var/log/vbox-install.log
    bash: /var/log/vbox-install.log: Permission denied
    

    As the permission is denied I have typed in 'su sudo' to be as root:

    su sudo /var/log/vbox-install.log
    No passwd entry for user 'sudo'
    

    So I tried:

    su /var/log/vbox-install.log
    No passwd entry for user '/var/log/vbox-install.log'
    

    And then:

    sudo /var/log/vbox-install.log
    [sudo] password for mroovka: 
    sudo: /var/log/vbox-install.log: command not found
    

    So I just typed in 'su' then tried to check the /var/log/vbox-install.log again but the outcome was…

    mroovka@mroovka-N102SP-N100SP-N101SP:~$ su
    Password: 
    root@mroovka-N102SP-N100SP-N101SP:/home/mroovka# /var/log/vbox-install.log
    bash: /var/log/vbox-install.log: Permission denied
    

So I don't really know what to do, as I have only one account and I am the administrator.

Thank you in advance for your help.

PS. I know this question may be duplicate but I read a lot about it and it is very challenging for me to solve this issue.

Best Answer

There is no /var/log/vbox-install.log, it was not created. The error when you tried to install the kernel module states that it couldn't create that file because it lacked permissions.

Please to run a program as root use sudo, in your case you need to type:

sudo /etc/init.d/vboxdrv setup

If there is any problem with it you can read the log with the command:

gedit /var/log/vbox-install.log

No need to be root just to read it.