Hi, Now, I'm trying to make it autostart (with ksysv and the following rc)
From mcdonc's how-to and some changes to my system:
#! /bin/sh # # processname: zope2 # Source function library. . /etc/rc.d/init.d/functions # Get config. . /etc/sysconfig/network # Check that networking is up. if [ ${NETWORKING} = "no" ] then exit 0 fi # See how we were called. case "$1" in start) echo -n "Starting Zope2 service: " daemon /usr/local/zope/start ;; stop) echo -n "Stopping Zope2 service: " /usr/local/zope/stop ;; restart|reload) $0 stop $0 start ;; *) echo "Usage: zope {start|stop|restart}" exit 1 esac exit 0 I changed daemon /usr/local/zope/start to daemon su nobody /usr/local/zope/start & ^^^^^^^^^ ^ and /usr/local/zope/stop to su nobody /usr/local/zope/stop ^^^^^^^^^ Am I allowed to use 'su nobody' in an rc? And using '&' so unix can go further with loading all other modules? Can these give security risks? Is there another way? It also looks that 'su nobody' isn't even neseccary. Why? I want to use Zope with Apache, so I gave permission to nobody to start/stop Zope. How comes that I don't have to use 'su nobodoy'? Regards, Tom.
On Wed, 2 Feb 2000, Tom Deprez wrote:
I changed daemon /usr/local/zope/start to daemon su nobody /usr/local/zope/start & ^^^^^^^^^ ^
and
/usr/local/zope/stop to su nobody /usr/local/zope/stop ^^^^^^^^^
Am I allowed to use 'su nobody' in an rc? And using '&' so unix can go further with loading all other modules? Can these give security risks? Is there another way?
It also looks that 'su nobody' isn't even neseccary. Why? I want to use Zope with Apache, so I gave permission to nobody to start/stop Zope. How comes that I don't have to use 'su nobodoy'?
Tom - the z2.py start up script will automatically set the UID to nobody if start as root. So you do not need to explicitly set it. Another issue is that you do not need to use daemon to start the process because the z2.py script takes care of that too If your start script includes the option -Z (but *not* the -D option) then: /usr/local/zope/start should be sufficient. It will actually make Zope a deamon process and supervise it too. Pavlos
participants (2)
-
Pavlos Christoforou -
Tom Deprez