Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission denied while running startup.sh in linux [closed]

Tags:

java

linux

tomcat

I am trying to run tomcat 6 in linux when I invoke startup.sh I see this error in 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.

like image 617
Nancy Avatar asked Nov 04 '13 09:11

Nancy


People also ask

How do I fix permissions denied in Linux?

For solving this error, you need to add the correct permissions to the file to execute. However, you need to be a “root” user or have sudo access for changing the permission. For changing the permission, Linux offers a chmod command. The chmod stands for change mod.

How do I fix shell script permission denied error in Linux?

To fix the permission denied error in Linux, one needs to change the file permission of the script. Use the “chmod” (change mode) command for this purpose.

How do I give permission to sh file in Linux?

We can provide the executable permission by using the below command, chmod +x filename.sh. chmod (Change Mode) - Using chmod we can change the access permissions to file system objects. +x - It makes the file executable.

Why is my permission denied in Terminal Linux?

This error occurs when the user does not have the privileges to make edits to a file. Root has access to all files and folders and can make any edits. Other users, however, may not be allowed to make such edits. Remember that only root or users with Sudo privileges can change permissions for files and folders.


2 Answers

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
like image 86
Govan Avatar answered Sep 20 '22 06:09

Govan


Try this:

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

and then do:

$ sudo startup.sh
like image 25
Juned Ahsan Avatar answered Sep 21 '22 06:09

Juned Ahsan