Thanks all for the replies.
Turns out I needed to execute my "C" program with a "nohup" i.e.
$ nohup /usr/local/bin/ManageTomcat START
Tomcat was only stopping after about 10 mins because that's when I logged out.
Doh !
In the business app code I now execute the above and regular users can now
> I think you should check the return value of setuid.
>
> I don't think you can change the uid of a process that easily.
>
> Otherwise you could also write setuid(0), become root and that would look to
> me as a huge security hole.
>
You need to be root to "chmod u+s [your_program]" so your
I'm running Tomcat 9.0.14 on Centos 8 with JDK 15.
Tomcat is loaded in /opt/tomcat, the directory owned by "joe". If I login as
"joe" and start Tomcat, everything is fine.
We have people login to the Centos system to run the business application as
"mary", "jane", "fred" etc. Sometimes they wan