Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install MATLAB2012 on my Ubuntu machine, and, in order to do that I have to give the installation program the root rights, this is what I've tried :

root@Engine:/media/ENGINE# ./install
bash: ./install: Permission denied

I've tried also gsku :

root@Engine:/media/ENGINE# gksu ./install

Nothing happens.

Thanks for your help!

share|improve this question
up vote 2 down vote accepted

If you still get the Permission denied message when you try to run something while you are root, this means that the program you are trying to run doesn't have the executable bit, and thus it isn't allowed to run as program, it is consider as a simple file by the system.

The gksu you gave there while you were root wouldn't solve any problem, you were root, and root is allowed to do anything.

So, in order to give it the executable bit:

chmod +x install

Now, the system recognizes that the file 'install' is not a simple file, but it is actually a program. After that, you can successfully run:


And you should be OK :)

PS: I myself remember, when I was not used to Linux as well, to be very confused by this Permission denied message while I was root. I mean, I was root, who denies me to do anything ? I am the lord of this land :P

share|improve this answer
engine@Engine:/media/ENGINE$ sudo su [sudo] password for engine: root@Engine:/media/ENGINE# chmod +x install root@Engine:/media/ENGINE# ./install bash: ./install: Permission denied <code> – Engine Aug 8 '12 at 17:55
Oh, now I see, the executable is at an external media, copy the installation files to your local hard disk in order to install! This is because non-extX file systems do not allow the executable bit to be placed to the files... So move your files inside your hard disk and try chmod +x again. – hakermania Aug 8 '12 at 17:57
thanks for your help hakermania: but it didn't work. engine@Engine:~/GOOD/MATLAB$ sudo su [sudo] password for engine: root@Engine:/home/engine/GOOD/MATLAB# chmod +x install root@Engine:/home/engine/GOOD/MATLAB# ./install Preparing installation files ... Installing ... ./install: 1: eval: /tmp/mathworks_8262/sys/java/jre/glnxa64/jre/bin/java: Permission denied Finished – Engine Aug 8 '12 at 18:13
sorry I don't know how to write code format here – Engine Aug 8 '12 at 18:14

You can also try sh ./install on the media (if you are the root/superuser) or sudo sh ./install

share|improve this answer
thanks Marius, it worked but I got the same Java error – Engine Aug 8 '12 at 18:16
@Engine what "Java" error are you getting? – Thomas W. Aug 8 '12 at 18:25
./install: 1: eval: /tmp/mathworks_8461/sys/java/jre/glnxa64/jre/bin/java: Permission denied Finished – Engine Aug 8 '12 at 18:31
Me too. Did you solve it? (chmodding sys/java/.../java from install dir doesn't work). – Primož Kralj Sep 6 '12 at 12:51

Matlab 2012a Installation Instructions

You will need superuser privileges. The assumption is that MATLAB install files are located at /media/MATHWORKS_R2011a in your filesystem.

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, Run the MATLAB installer with the following Terminal command:

sudo /media/MATHWORKS_R2011A/install

When prompted to 'Choose installation type' you should select custom. This will allow you to create symbolic links to MATLAB in /usr/local/bin.1

Read on

1Source:Ubuntu Documentation

share|improve this answer

so I got it, the first problem with the file install is was solved, with both solutions :

chmod +x install

and also from the media like Marius suggested : sudo sh ./install.

for the Java installation error : I had to make an excutable bit for java file under : MATLAB/sys/java/jre/glnxa64/jre/bin

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.