Working in a managed environment, we do not have access to 'root' except by very special request (e.g. for upgrades, to run 'rpm').
I have noticed that the parent Apache process retains it's UID as root even after starting. Yet the jive-httpd.conf appears to be set to switch to 'daemon'. Questions:
1. Why does it stay running as root? Shouldn't it switch to the 'jive' user? Can I change the jive-httpd.conf (or somewhere else) to make it switch to the 'jive' id after binding to port 80? (That doesn't seem to work right now though since it's already set to change to 'daemon' and it doesn't do that.)
2. There are a number of directories under /usr/local/jive that retain root ownership. Since we do not have 'root' access (except possibly, to start/stop the services but that request is in process), (a) is it safe to convert all of this over to jive (assuming we can do #1 above and get the parent httpd over to running as jive)?
And, can future package releases handle these two items automatically?
3. The file /usr/local/jive/applications/sbs/bin/instance is created at install time, and seems to be the right place to change the AJP_PORT, where we had a conflict with Altiris on port 9002. I don't see this file documented anywhere in the Jive documentation - can we get this documented or can you point that location out to me?
4. Is there a recommended method to start/stop the application, database and httpd without root?
Thanks and regards,
Eric Hendrickson
Hi Eric,
1. Why does it stay running as root? Shouldn't it switch to the 'jive' user? Can I change the jive-httpd.conf (or somewhere else) to make it switch to the 'jive' id after binding to port 80? (That doesn't seem to work right now though since it's already set to change to 'daemon' and it doesn't do that.)
I will have to follow up on that with an engineer who worked on the platform. I do not see any jive-httpd processes running as root on our hosted instances.
2. There are a number of directories under /usr/local/jive that retain root ownership. Since we do not have 'root' access (except possibly, to start/stop the services but that request is in process), (a) is it safe to convert all of this over to jive (assuming we can do #1 above and get the parent httpd over to running as jive)?
These directories are intentionally left as owned by root for their protection. Making changes to these folders could potentially lead to application instability. Therefore they are intentionally protected at a level where the application, or most application admins, are unable to edit them.
3. The file /usr/local/jive/applications/sbs/bin/instance is created at install time, and seems to be the right place to change the AJP_PORT, where we had a conflict with Altiris on port 9002. I don't see this file documented anywhere in the Jive documentation - can we get this documented or can you point that location out to me?
You can find information on the "instance" file in the Operations Cookbook: http://www.jivesoftware.com/builds/docs/jive_sbs_employee/latest/admin/OperationsCookbook.html#changing_the_configuration_of_an_existing_instance
4. Is there a recommended method to start/stop the application, database and httpd without root?
Application management can be performed by the jive user with any of the commands in the /usr/local/jive/bin/ directory. You should not have any need to restart the database server. Additionally, you can control Apache and Tomcat individually using the /usr/local/jive/<application>/manage script.
Regards,
Karl
Hi Karl, thanks for your response.
I'll show you these ps output's to demonstrate that the parent httpd process is still running as root.
Hi Eric,
I ran this by our lead platform developer. He explained that the root process is needed to bind to port 80, and subsequently spawn the child processes which will handle the actual requests. The single root process is needed as the parent to keep the socket open on that privileged port, but it does not actually serve any requests.
Regards,
Karl
Hi Karl,
Yes, it does need root to bind to any port below 1024. However, best practices are that it should change it's EUID to something else after it has obtained port 80.
This is why the /usr/local/jive/etc/httpd/conf/httpd.conf file has this setting in it:
So why doesn't the parent httpd change it's EUID to 'jive'?
And now this also brings up another question, which is, Why are there two httpd.conf files?
/usr/local/jive/etc/httpd/conf/httpd.conf [OWNER JIVE]
/usr/local/jive/httpd/conf/jive-httpd.conf [OWNER ROOT]
The latter one has the following, with a more standard Apache comment:
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon
Hi Eric,
It looks like this is a standard configuration for Apache servers. Please see: http://httpd.apache.org/docs/1.3/mod/core.html#user
If you do start the server as root, then it is normal for the parent process to remain running as root.
Regards,
Karl
I see what you mean, thanks. I somehow did not know that...
However this will be ok as in parallel with this I had requested sudo permission to run the start stop scripts as root, and this was granted today. So we will be able to do "service jive-* [start|stop|status]" as root (with sudo) so I expect we'll be all set here.
Can we keep this ticket open for a week or two until we get past the build of the Stage environment and confirm that we are all set there too - but I will move it down the priority list.
Thanks and regards,
Eric
Sure, that sounds good Eric.
Regards,
Karl
One question I still need answered here is, as shown above, why are there two httpd.conf files? I can see in the process table which one is in use but if I wanted to modify the Apache config should I modify both of them or just one?
Thanks!
Eric
Hi Eric,
The jive-httpd.conf is used to intialize Apache, bind to port 80, and kick off the other processes. The other httpd.conf is the one which is used for configuration settings, and this file in turn would load application-specific configuration files if you had multiple SBS installations running on the same platform.
Our recommendation is to make any configuration changes to httpd.conf, and leave the jive-http.conf file untouched unless you have a very specific reason.
Regards,
Karl
Hi Eric,
Do you have any additional questions about this, or can this case be closed?
Regards,
Karl
Hi Karl,
Thanks for asking - yes this is all settled and you can close this.
Regards,
Eric
Jive combines the most powerful features of collaboration software, community software,
social networking software & social media monitoring into the leading SBS solution.
© Copyright 2000–2010 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205
Sales: 877-495-3700 | General: 503-295-3700
Privacy Policy | Sitemap | Jobs | Contact Us