A few questions: 1: Is this Tomcat instance the one you're running Jenkins on? I'm guessing not; if you are, then you're trying to press your own 'off' button. 2: Does the Tomcat instance run on a port beneath 1024? If so, I believe that the instance has to run as root, or hide behind something that is running as root. 3: If you're not running on a low port, does the Tomcat instance need to be running as root? In fact, is it, or is the init.d job sudoing to a non-root user before launching the app. 4: Do you need to start the server from Jenkins, stop it from Jenkins, or both? 5: Do you have read/write access to the init.d launcher? If so, I'd suggest writing your own launcher with all the arguments you need and having the init.d launcher just sudo to a non-root user and run your launcher. That way, you'd be able to run that launcher from Jenkins directly without messing with init.d.
There are two basic problems here. One is that you are considering running Jenkins as root. If you can run _anything_ from Jenkins as root, then you can run _everything_ from Jenkins as root. If you really need Jenkins to run a particular thing as root, you may want to look at setuid scripts, which would be a smaller security hole (but it's still probably a security hole). The other is that you want to control start/stop from Jenkins, and the fact that there's an init.d script means that you also want to control it from init. It's probably better to let one or the other control the server, but I can see situations where you would require both. -----Original Message----- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Sami Tikka Sent: Saturday, February 02, 2013 6:45 PM To: jenkinsci-users@googlegroups.com Subject: Re: How to lauch tomcat6 into /etc/init.d It is not a good idea to run Jenkins as root. Unless you know what you are doing. And even then it is not a good idea. And if you do not know how to do it, you definitely should not be doing it. Maybe instead you could explain what you are trying to do and why do you think you need Jenkins to have root privileges? I'm sure there are better ways to do what you need to do without running Jenkins as root. -- Sami adrien ruffie <adriennolar...@hotmail.fr> kirjoitti 29.1.2013 kello 18.40: > Hello all I have a problem, > > My tomcat is launch on the server with /etc/init.d/tomcat6 start/stop > And only with following script because several properties were set > into This script. > > But Jenkins doesn't have a a root privileges to run this script, how I > can do that With a job plz ? > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. The information in this message is for the intended recipient(s) only and may be the proprietary and/or confidential property of Litle & Co., LLC, and thus protected from disclosure. If you are not the intended recipient(s), or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this communication is prohibited. If you have received this communication in error, please notify Litle & Co. immediately by replying to this message and then promptly deleting it and your reply permanently from your computer. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.