“许可被拒绝” RHEL5 上的 .sh 脚本出错
root@server [/mnt/elm332/Setup/Linux]# ./setupLinux64.sh -c
Unpacking JRE ...
Starting Installer ...
./setupLinux64.sh: line 433: /tmp/setupLinux64.sh.28603.dir/jre/bin/java: Permission denied
root@server [/mnt/elm332/Setup/Linux]# whoami
root
为什么会发生这种情况呢?请注意,这是一个已挂载的 ISO 文件(复制到 /tmp 中),其权限为:
-rw-r--r-- 1 root root 554434560 Aug 26 16:05 elm3.3.2.iso
第 433 行如下:
“$app_java_home/bin/java” -Dinstall4j.jvmDir="$app_java_home" -Dexe4j.moduleName="$prg_dir/$progname" -Dexe4j.totalDataLength=73387877 -Dinstall4j.cwd="$old_pwd" -Djava.ext.dirs="$app_java_home/lib/ext" “-Dinstall4j.nolaf=true” “-Dsun.java2d.noddraw = true”“$ vmov_1” “$vmov_2”“$vmov_3”“$vmov_4” “$vmov_5”$INSTALL4J_ADD_VM_PARAMS -classpath "$local_classpath" com.install4j.runtime.Launcher 启动 com.install4j.runtime.installer.Installer 假假""""假真假"" 真 真 0 0 "" 20 20 "Arial" "0,0,0" 8 500“版本 10.0”20 40“Arial” "0,0,0" 8 500 -1 "$@"
root@server [/mnt/elm332/Setup/Linux]# ./setupLinux64.sh -c
Unpacking JRE ...
Starting Installer ...
./setupLinux64.sh: line 433: /tmp/setupLinux64.sh.28603.dir/jre/bin/java: Permission denied
root@server [/mnt/elm332/Setup/Linux]# whoami
root
Why would this be happening? Note that this is a mounted ISO file (copied in /tmp), and the permissions on that are:
-rw-r--r-- 1 root root 554434560 Aug 26 16:05 elm3.3.2.iso
Line 433 is as follows:
"$app_java_home/bin/java"
-Dinstall4j.jvmDir="$app_java_home" -Dexe4j.moduleName="$prg_dir/$progname"
-Dexe4j.totalDataLength=73387877 -Dinstall4j.cwd="$old_pwd" -Djava.ext.dirs="$app_java_home/lib/ext"
"-Dinstall4j.nolaf=true"
"-Dsun.java2d.noddraw=true" "$vmov_1"
"$vmov_2" "$vmov_3" "$vmov_4"
"$vmov_5" $INSTALL4J_ADD_VM_PARAMS
-classpath "$local_classpath" com.install4j.runtime.Launcher launch
com.install4j.runtime.installer.Installer
false false "" "" false true false ""
true true 0 0 "" 20 20 "Arial" "0,0,0"
8 500 "version 10.0" 20 40 "Arial"
"0,0,0" 8 500 -1 "$@"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
感谢您的努力提供帮助。该问题是因为服务器上存在 cPanel 并阻止在 /tmp 中执行/创建文件
。来自专用托管提供商的帮助台:
thanks for your efforts to help. The issue was because of cPanel which was present on the server and preventing execution/creation of files in /tmp
From the help desk of the dedicated hosting provider: