简体   繁体   中英

permission denied on /tmp folder installing glassfish on CentOS

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 glassfish using:

# groupadd glassfish

and added a new user glassfish using:

# useradd -s /bin/bash -g glassfish glassfish
# passwd glassfish 

Following the Glassfish install instructions, I'm getting the following error launching the self-extraction file:

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

The tmp/ directory has:

4 drwxrwxrwx  12 root root  4096 Feb  5 20:39 tmp/

Anyone know how to resolve this error?

UPDATE 1

I entered the following command as root user, but nothing changed when installing as glassfish user:

 # mount -o remount,exec /tmp /var/tmp

UPDATE 2

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:

+ 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)

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.

Also, I tried the entire install process over again but using root user instead of glassfish user, and the same exact error occurs.

What else could cause this error? I'm using CentOS 6.2.

/tmp is mounted noexec . Remount it exec .

Well, maybe you need enough privileges...

Execute with "root's privileges"

$ su -

or

Add "glassfish" user like a sudoer

How add a sudoer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM