403 Access Denied in Tomcat

403 Access Denied on Tomcat 8 Manager App without prompting for user/password


Correct answer can be found here


Looks like this issue can be reproduced while folowing mentioned tutorial on unix machines. Also noticed that author uses TC 8.0.33

Win (and OSX) do not have such issue, at least on my env:

Server version:        Apache Tomcat/8.5.4
Server built: Jul 6 2016 08:43:30 UTC
Server number: 8.5.4.0
OS Name: Windows 8.1
OS Version: 6.3
Architecture: amd64
Java Home: C:\TOOLS\jdk1.8.0_101\jre
JVM Version: 1.8.0_101-b13
JVM Vendor: Oracle Corporation
CATALINA_BASE: C:\TOOLS\tomcat\apache-tomcat-8.5.4
CATALINA_HOME: C:\TOOLS\tomcat\apache-tomcat-8.5.4

After tomcat-users.xml is modified by adding role and user Tomcat Web Application Manager can be accessed on Tomcat/8.5.4.

Getting 403 access denied error when uploading war file to tomcat8

Don't forget to have a look at the logs. I got the exact same exception but the root-cause was: max file size exceeded.

HTMLManager: FAIL - Deploy Upload Failed, Exception: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: 
the request was rejected because its size (54463322) exceeds the configured maximum (52428800)

403 access denied on tomcat 7.0.42

Remove the manager-script and add "manager-gui,manager-status".

To access the HTML interface, you need to have the manager-gui role, but you must NOT have the manager-script or manager-jmx roles.

<tomcat-users>
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="tomcat" password="tomcat" roles="manager-gui,manager-status"/>
</tomcat-users>

some information for you about roles from http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html

  • manager-gui — Access to the HTML interface.
  • manager-status — Access to the "Server Status" page only.
  • manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server
    Status" page.
  • manager-jmx — Access to JMX proxy interface and to the "Server Status" page.

403 Access Denied in Tomcat

To use the web administration gui you have to add the gui role.

In [Tomcat installation path]/conf/tomcat-users.xml you can define role and affect them to user. For example :

<tomcat-users>
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>

<user username="name" password="pwd" roles="admin,admin-gui,manager,manager-gui"/>
</tomcat-users>

Note :

You may not have any default username and password defined here so it's always good to take the time to do this configuration or you'll encounter issue when using Tomcat integrated in IDE like NetBeans. Indeed it will require these credentials in order to use it properly.



Related Topics



Leave a reply



Submit