Kali Linux VM: Permission denied to run shell script, as root

I've just installed Kali Linux (Debian) in a VirtualBox VM. I want to install the VBOX Additions that will allow me to configure things like screen resolution (hopefully).

My problem is running the install script. I'm root, I've chmoded everything, I have the rights to execute the script but I still get 'Permission Denied'. I've tried with sudo as well.

Check the screen below:

enter image description here


It might be that the /media/cdrom0 filesystem has the noexec flag set. You can check this with:

mount -v | grep cdrom0

If there is noexec between the parentheses, files on the filesystem are not executable. (like (noexec,nosuid,nodev))

You can try remounting the filesystem with the exec flag:

sudo mount -o remount,exec,ro /media/cdrom0

note ro to indicate readonly.

Alternatively you can copy all files to disk and run the scripts from there.


No need to mess with remounts or anything. Just run:

sudo sh VBoxLinuxAdditions.run