A simple guide which can help you to fix the VboxLinuxAdditions.run permission denied Error in Debian Linux.
You typically encounter vboxlinuxadditions.run permission denied error in Debian Linux while trying to install VirtualBox Guest Additions. The “permission denied” error indicates that the vboxlinuxadditions.run
script lacks the necessary permission to execute.
However, you also get this error even if you run as root (see below) despite the root account’s permissions. This can be frustrating. This happens because when you insert the guest additions CD via the VirtualBox menu, Debian creates an /etc/fstab entry with the “noexec” or “noauto” option. This causes all the permission bits (rwx) to be ignored, even if you run as root.
Here’s how to fix it.
Fix VboxLinuxAdditions.run permission denied Error
- Open the terminal and browse to the mounted VirtualBox Guest Addition drive. Ideally, it should be in “/media/cdrom0”.
- In the terminal, run the command by calling the shell interpreter:
sh ./VBoxLinuxAdditions.run
- Hit enter, and you should be all set.
- Use the above command when running
sudo ./VBoxLinuxAdditions.run
does not work.
Alternative way
- If the above method does not work, follow the steps below.
- Open the terminal and get into the root prompt.
- Open
/etc/fstab
with nano or any other editor. - In the mounted disk line for VirtualBox, you should see the “
user,noauto
” option against your user id. - Change it to “
user,exec
“. - Save and close the file.
- Now, run
./VBoxLinuxAdditions.run
from the root prompt. - It should work now.
Here’s a sample for my test machine before and after the change of /etc/fstab.
Before
# <file system> <mount point> <type> <options> <dump> <pass> /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
After
# <file system> <mount point> <type> <options> <dump> <pass> /dev/sr0 /media/cdrom0 udf,iso9660 user,exec 0 0
By following the above two steps, you should be able to fix the “vboxlinuxadditions.run permission denied” error in Debian Linux.
Do let us know in the comment box if the above steps fix the issue for others’ benefit.