-----Original Message-----
From: Scott Gifford [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 11:54 AM
To: Maxim Nechaev
Cc: modperl@perl.apache.org
Subject: Re: Restarting apache from child?


Maxim Nechaev <[EMAIL PROTECTED]> 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

Reply via email to