20

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

2

4 Answers 4

25

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.

4
  • 7
    Running bash < ./autorun.sh should also work.
    – Kenster
    Commented Jun 13, 2014 at 14:06
  • 9
    Indeed, never thought about that. As a variation, sh autorun.sh is more commonly used.
    – mtak
    Commented Jun 13, 2014 at 15:03
  • 2
    Moreover, one needs build-essential, module-assistant and kernel's headers. Here there is a nice summary of things to do for getting VBoxLinuxAdditions.run to play nicely.
    – Atcold
    Commented Nov 2, 2015 at 5:57
  • 1
    copying the files is the fastest way. Commented Mar 23, 2016 at 10:41
3

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

sudo sh VBoxLinuxAdditions.run

0

The file you want to run is VBoxLinuxAdditions.run , the files named runasroot.sh and autorun.sh will return that error even if you do change the attributes.

After you copy the contents of the Guest additions ISO to a folder on the guest machine if it appears in green text when listed in a terminal then it is already executable. If not you can type into a terminal after navigating to the directory where you saved the files on the guest machine. chmod -x VBoxLinuxAdditions.run or just right click on it and select properties and then select the permissions tab and click the execute checkbox - allow executing as a program.

-2

The problem is due to the permission not set to executable to fix this

FIX 1

COPY THE EXECUTABLE TO THE HOME DIRECTORY AND THEN RUN THESE COMMANDS

chmod -x filename.sh

./filename.sh

it should work..

Fix 2

Change the permission of the file system in which the *.sh file is located.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .