P
P
P_Alexander2018-02-17 02:18:21
Java
P_Alexander, 2018-02-17 02:18:21

How to solve the problem (permission denied) when starting TomCat from the command line?

Hello, I have Tomcat 9, and it works well in the IDE, without failures, but I decided to try to run it from the command line and came across a problem, namely:
Starting Tomcat from cmd:

C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin> startup.bat

Tomcat console output:
java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 9.0\logs\catalina.2018-02-17.log (Отказано в доступе)

java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 9.0\logs\localhost.2018-02-17.log (Отказано в доступе)

java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 9.0\logs\manager.2018-02-17.log (Отказано в доступе)

java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 9.0\logs\host-manager.2018-02-17.log (Отказано в доступе)

Output to cmd console:
C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin> startup.bat
Using CATALINA_BASE:   "C:\Program Files\Apache Software Foundation\Tomcat 9.0"
Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Tomcat 9.0"
Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_131"
Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\tomcat-juli.jar"

C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin>

I scoured the Internet, but I did not find a solution, who knows and can provide a big thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-02-17
@P_Alexander

Either install Tomcat in a directory that doesn't require admin rights to be written to, or run cmd as administrator.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question