2 Ways to Fix VboxLinuxAdditions.run permission denied Error

2 min


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.

VBoxLinuxAdditions.run permission denied error
VBoxLinuxAdditions.run permission denied error

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.
Fixing the error
Fixing the error

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.


Arindam

Creator and author of debugpoint.com. Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments