title: permission denied on /tmp folder installing glassfish on CentOS
body: <p>I'm trying to install Glassfish 3.1.1 on Centos 6.2 Linux server with Apache HTTP front end. I created a new group called <code>glassfish</code> using:</p>
  
  <pre><code># groupadd glassfish
  </code></pre>
  
  <p>and added a new user <code>glassfish</code> using:</p>
  
  <pre><code># useradd -s /bin/bash -g glassfish glassfish
  # passwd glassfish 
  </code></pre>
  
  <p>Following the Glassfish install instructions, I'm getting the following error launching the self-extraction file:</p>
  
  <pre><code>glassfish@host3 [~/software]# sh ./glassfish-3.1.1-unix.sh 
  Extracting the installer archive...
  Extracting the installer runtime...
  Extracting the installer resources...
  Extracting the installer metadata...
  
  Welcome to GlassFish V3 installer
  
  Using the user defined JAVA_HOME : /usr/java/jdk1.6.0_30
  Entering setup...
  product-installer.sh: line 178: /tmp/install.020512204334/install/bin/engine-wrapper: Permission denied
  </code></pre>
  
  <p>The tmp/ directory has:</p>
  
  <pre><code>4 drwxrwxrwx  12 root root  4096 Feb  5 20:39 tmp/
  </code></pre>
  
  <p>Anyone know how to resolve this error?</p>
  
  <p>UPDATE 1</p>
  
  <p>I entered the following command as root user, but nothing changed when installing as glassfish user:</p>
  
  <pre><code> # mount -o remount,exec /tmp /var/tmp
  </code></pre>
  
  <p>UPDATE 2</p>
  
  <p>I entered some set -x and set +x commands into the glassfish-3.1.1-unix.sh file for debugging purposes, and the first problem seen executing this file is as follows:</p>
  
  <pre><code>+ echo 'Extracting the installer runtime...'
  Extracting the installer runtime...
  + /home/glassfish/java/jdk1.6.0_30/bin/jar xf ./Product/Packages/Engine.zip
  java.io.FileNotFoundException: ./Product/Packages/Engine.zip (No such file or directory)
  </code></pre>
  
  <p>However, if I take the same glassfish-3.1.1-unix.sh file and unzip it in a dummy directory, I DO see that /Product/Packages/Engine.zip is there. So the file is not corrupted. </p>
  
  <p>Also, I tried the entire install process over again but using root user instead of glassfish user, and the same exact error occurs.</p>
  
  <p>What else could cause this error? I'm using CentOS 6.2.</p>