在 linux 中运行 startup.sh 时权限被拒绝

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19764626/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-07 01:15:36  来源:igfitidea点击:

Permission denied while running startup.sh in linux

javalinuxtomcat

提问by Nancy

I am trying to run tomcat 6 in linux when I invoke startup.sh I see this error in catalina.out

当我调用 startup.sh 时,我试图在 linux 中运行 tomcat 6 我在 catalina.out 中看到此错误

/home/***/apache-tomcat-6.0.29/bin/catalina.sh: line 338: /home/***/jre/bin/java: Permission denied

How can I get it running ? please help.

我怎样才能让它运行?请帮忙。

采纳答案by Juned Ahsan

Try this:

尝试这个:

cd /home/***/jre/bin/
$ chmod +x java

and then do:

然后做:

$ sudo startup.sh

回答by V H

You need to look at where it is outputting the logs for starting up your java process and ensure the user that is trying to start it has permissions to write to it - you can try running java as the current user which should work and point the issue at being the explained

您需要查看它在何处输出用于启动 java 进程的日志,并确保尝试启动它的用户有权写入它 - 您可以尝试以当前用户身份运行 java,这应该可以工作并指出问题在被解释

回答by Govan

Go to that folder and type the following code.

转到该文件夹​​并键入以下代码。

chmod 777 *

and try running it.

并尝试运行它。

Its because of the permissions set.

这是因为权限设置。

If you are specific with permissions give excecute permission to it. Or

如果您具有特定的权限,请为其授予执行权限。或者

cd home/
chmod 777 apache-tomcat6.0
cd apache-tomcat6.0/bin
sh startup.sh