tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier (tomcat)>
Subject Re: Trouble setting TOMCAT_USER
Date Mon, 29 Aug 2016 20:27:56 GMT
1) don't top-post

On 29.08.2016 21:50, Jorge Alfonso wrote:
> In order to setup the users for Tomcat you have to edit the file
> tomcat-users.xml
> <tomcat-users>
>   <role rolename="admin-gui"/>
>    <role rolename="manager-gui"/>
>    <role rolename="role1"/>
>    <user username="Myadmin" password="s3cret" roles="admin-gui,
> manager-gui"/>
>    <user username="both" password="s3cret" roles=admin-script"/>
>    <user username="role1" password="change" roles="role1"/>
> </tomcat-users>
> Once the users are set, and you could have set several users depending your
> need, shutdown and startup again your Tomcat and you would be able to see it
> running for your user and managing it.

2) this has nothing to do with the user under which Tomcat is running.



> -----Original Message-----
> From: Maxfield, Rebecca A []
> Sent: Monday, August 29, 2016 2:20 PM
> To:
> Subject: Trouble setting TOMCAT_USER
> Hi there!
> In order to resolve an issue with a Tomcat web app, I'm trying to run Tomcat
> as a user other than the default user. Following other advice, I looked in
> the conf file (/etc/tomcat/tomcat.conf) for TOMCAT_USER and saw that it
> wasn't set; however, my efforts to set it haven't seemed to result in any
> change.
> I wrote:
> TOMCAT_USER="myusername"
> which is the same syntax as the other variables in the file, JAVA_HOME and
> so on. (Incidentally, these don't echo in the command line, but Tomcat does
> seem to be running.) I then restarted, but a look at the process list showed
> that it was still running as default user "tomcat" rather than as
> myusername.
> What am I missing and how can I run Tomcat as another user?

You do not say so, but from the above it is a valid guess that you are running tomcat 
under some flavor of Linux, and that you installed it from the package provided by that 
Linux distribution.

Unfortunately, without more information, it is difficult to know how you are really 
starting tomcat, and what influence that "TOMCAT_USER" line really has in the big scheme 
of things.

Try to be more explicit and provide some details, such as which Linux, what command you 
use to start/restart tomcat, what version of Tomcat that is, etc..
We don't have a crystal ball here, so we don't know those things.

> Thanks!
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message