IntelliJ says 'cannot run program '/path/to/tomcat/bin/catalina.sh' error=13 permission denied

JavaTomcatSpring MvcIntellij Idea

Java Problem Overview


In intelliJ ulimate, running a bare bone spring mvc application I get the error:

'cannot run program '/path/to/tomcat/bin/catalina.sh' error=13 permission denied

How to I fix this? (i'm on a mac)

Java Solutions


Solution 1 - Java

In short, from a console:

chmod a+x /path/to/tomcat/bin/catalina.sh

This assumes that you 've elided the Tomcat path in your post, and checked that it really does exist on your system before posting here. Depending on the existing permissions of the file, you may need to issue the above command as a user with sufficiently elevated privileges.

Solution 2 - Java

Solution: You set permission for Tomcat directory:

chmod -R 777 apache-tomcat-directory

Solution 3 - Java

I meet this error today. It's because I take a wrong package of Tomcat6. In Max OS, I should download the tar.gz , but I download the zip. Make sure you get the right Tomcat package.

Solution 4 - Java

When I face with this problem I check:
enter image description here

Right click on catalina.sh -> Properties -> Permissions.

Solution 5 - Java

Do this everytime you run IntelliJ Idea, and free yourself from all that chmod nonesense

Linux users only(As I have found myself here):

Just go to the terminal and do su and while you received the "great power with great responsibility", go to /usr/local/bin and there you have your idea file, it gives root privileges to your IntelliJ Idea to never face permission problems, if you couldn't find the idea file just hop on Tools -> Create Command-line launcher to create a new one or just to look where the file is.

For running the idea file, just type idea in terminal while you are root user and hit enter.

had this problem with tomcat, no matter how many times you do the chmod stuff, when you dont have enough privilege in your user bank, you will mess things up with it.

Good luck.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBlankmanView Question on Stackoverflow
Solution 1 - JavaAndrzej DoyleView Answer on Stackoverflow
Solution 2 - JavaJames GrahamView Answer on Stackoverflow
Solution 3 - JavaZongBing TianView Answer on Stackoverflow
Solution 4 - JavaDmitMedvView Answer on Stackoverflow
Solution 5 - JavaAramis NSRView Answer on Stackoverflow