在 CentOS 上安装 glassfish 的 /tmp 文件夹的权限被拒绝
我正在尝试在带有 Apache HTTP 前端的 Centos 6.2 Linux 服务器上安装 Glassfish 3.1.1。我使用以下命令创建了一个名为 glassfish
的新组,
# groupadd glassfish
并使用以下命令添加了一个新用户 glassfish
:
# useradd -s /bin/bash -g glassfish glassfish
# passwd glassfish
按照 Glassfish 安装说明,启动自解压文件时出现以下错误:
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
tmp/ 目录有:
4 drwxrwxrwx 12 root root 4096 Feb 5 20:39 tmp/
有人知道如何解决此错误吗?
更新 1
我以 root 用户身份输入了以下命令,但以 glassfish 用户身份安装时没有任何变化:
# mount -o remount,exec /tmp /var/tmp
更新 2
我在 glassfish-3.1.1-unix.sh 文件中输入了一些 set -x 和 set +x 命令以进行调试,并且执行此文件时看到的第一个问题如下:
+ 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)
但是,如果我采用相同的 glassfish-3.1.1-unix.sh 文件并将其解压缩到虚拟目录中,我确实会看到 /Product/Packages/Engine.zip 有没有。所以文件没有损坏。
另外,我再次尝试了整个安装过程,但使用 root 用户而不是 glassfish 用户,并且出现了同样的错误。
还有什么可能导致此错误?我使用的是 CentOS 6.2。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
/tmp
已安装noexec
。重新安装它exec
。/tmp
is mountednoexec
. Remount itexec
.好吧,也许你需要足够的权限...
使用“root 权限”执行
或
添加“glassfish”用户,例如 sudoer
如何添加 sudoer
Well, maybe you need enough privileges...
Execute with "root's privileges"
or
Add "glassfish" user like a sudoer
How add a sudoer
我最终在 GlassFish 支持论坛的帮助下解决了这个问题。请参阅此处:
http://www.java.net/forum/topic/glassfish/glassfish/what-directories-does-glassfish-311-self-extracting-installer-touch-outside-directory-it-runs#comment-821920
I eventually solved this with the help of GlassFish support forum. See here:
http://www.java.net/forum/topic/glassfish/glassfish/what-directories-does-glassfish-311-self-extracting-installer-touch-outside-directory-it-runs#comment-821920