“许可被拒绝” RHEL5 上的 .sh 脚本出错

发布于 2024-09-18 04:46:24 字数 1034 浏览 7 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蝶…霜飞 2024-09-25 04:46:24

感谢您的努力提供帮助。该问题是因为服务器上存在 cPanel 并阻止在 /tmp 中执行/创建文件

。来自专用托管提供商的帮助台:

“安装程序已将安装文件解压到 /tmp 中,并尝试从那里运行安装。cPanel 安装在该服务器上,它所做的事情之一就是锁定 tmp,以便可执行文件无法从那里运行(使用 noexec 选项挂载)这是一项额外的安全预防措施,可防止有人通过不安全的网站脚本上传 rootkit。”

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:

"The installer has unpacked the install files in /tmp and is trying to run the install from there. cPanel is installed on that server, and one of the things it does is lock tmp so executables can't run from there (mount with noexec option). It's an additional security precaution to prevent someone from uploading a rootkit through an insecure website script."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文