Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 Torchlight from the Humble Indie Bundle 6. The installation file is an sh file. When I try to run the sh file I get this output.

[ user@pc:~/Desktop$ sudo sh ./
[sudo] password for user:
Current temporary directory (usually /tmp by default) does not seem to be executable!      
Please specify an alternative path by using the --target option.]

How do make the tmp dir executable or specify an alternate path?

I'm running ubuntu 12.10

share|improve this question
What command is being executed within the shell script when this error is reported? – astex Nov 7 '12 at 19:16
are you sure that your script is to be executed by dash (sh) and not by bash? – Walter Tross Nov 7 '12 at 21:14
I'm new to linux and I don't know what bash is. – user106287 Nov 7 '12 at 21:45
Since dash is the default shell on Ubuntu for running scripts (while bash is the default interactive shell), it does make sense that the script should be run with dash instead of bash. (For some time now, sh has been a symlink to dash.) – Eliah Kagan Aug 14 '13 at 11:00
up vote 3 down vote accepted

Your /tmp folder sounds like it is a separate filesystem mounted with the noexec option.

This is an intentional security measure to prevent the execution of programs written to the /tmp folder, but it's not the default setup of Ubuntu.

The script suggests a workaround - use the --target option to specify a different folder.


mkdir ~/tmp # Make a temp folder in your home folder
sudo sh ./ --target ~/tmp # Tell the installer to use it
rm -rf ~/tmp # remove it afterwards
share|improve this answer

The answer is to enter the following in to Terminal:

sudo sh ./ --target $PWD


sudo sh ./ --target /home/user/
share|improve this answer

run this in terminal :

mount -o remount,exec /tmp /var/tmp
share|improve this answer
Hi and welcome to Ask Ubuntu. When answering a question - please expand an answer explaining what you are about to say, possible consequences, what the commands will do, rollback etc. Thanks. – fossfreedom Nov 7 '12 at 20:07

Your Answer


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