RE: Restarting apache from child?
[prev]
[thread]
[next]
[Date index for 2005/03/15]
-----Original Message-----
From: Scott Gifford [mailto:sgifford@xxxxxxxxxxxx.xxx]
Sent: Tuesday, March 15, 2005 11:54 AM
To: Maxim Nechaev
Cc: modperl@xxxx.xxxxxx.xxx
Subject: Re: Restarting apache from child?
Maxim Nechaev <nechaev@xxxxxxxxxxxx.xx> writes:
> I need to restart or graceful restart apache server from one of his
> child. It is possible? If yes, how to do this more correctly?
The main Apache process runs as root, and each Apache child process
runs as a less-privileged user, and so would not have permission to
signal the main process to tell it to reload.
You could use a conventional perl script (ie not mod_perl) which is
setuid root (though you'd need to be extraordinarily careful), or have
an external daemon running as root which accepted restart requests on
a UNIX socket, then have your script send these requests.
----ScottG.
Scripts such as perl or ksh do not become root with setuid.
They really do not get the same privilege. Setuid to root
works ok with a compiled executable.
Abhay
 |
 |
RE: Restarting apache from child?
Jain, Abhay K, ALABS 18:05 on 15 Mar 2005
|