Based on your usage of /etc/tomcat/tomcat.conf you must be running the
Fedora/EPEL or RHEL-7/CentOS-7 distribution of tomcat. Firstly, the
TOMCAT_USER is tomcat by default; this is configured in the init
script. For tomcat to start and be owned by a user other than tomcat,
you should just need to set TOMCAT_USER in the conf or sysconfig file.
However, given that I don't know what version you're using there could
be some bug preventing this from occurring. Another thing that you
need to ensure is that the new user that you're using has the correct
permissions to view config, write to logs, etc. If it's failing to
start because of those reasons, you should see it in the
service/systemctl output, or the init log (depending on which distro
you're using).

Typically distribution issues (this isn't a problem with core tomcat)
aren't discussed on this list, however if you find me (csutherl) on
freenode (typically in #tomcat) I can help you along with any Red Hat
distributions of tomcat.

On Mon, Aug 29, 2016 at 4:28 PM, Jorge Alfonso <jo...@qbex.com> wrote:
> My Apologies again
>
> -----Original Message-----
> From: André Warnier (tomcat) [mailto:a...@ice-sa.com]
> Sent: Monday, August 29, 2016 4:28 PM
> To: users@tomcat.apache.org
> Subject: Re: Trouble setting TOMCAT_USER
>
> Jorge,
> 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.
>
>>
>
> Rebecca,
>
>> -----Original Message-----
>> From: Maxfield, Rebecca A [mailto:rmaxf...@providence.edu]
>> Sent: Monday, August 29, 2016 2:20 PM
>> To: users@tomcat.apache.org
>> 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: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to