httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evan Borgstrom <e...@mirrored.ca>
Subject Re: [users@httpd] Killing apache(bugg?)
Date Mon, 20 Jan 2003 16:33:49 GMT
Start apache as root
Have it drop it's privilages (through the User and Group directive) 
Now the killall will only kill the children process which the parent
will restart.

On my development server (apache 2.0.43, php 4.3.0) I wrote the
following:

more killall.php 
<?php system("killall -9 httpd"); ?>

And then accessed it, here's three ps's from a couple seconds after.

# ps auxw | grep httpd
root     11281  0.0  0.1  6872 1068 ?        S    Jan12   0:45
/usr/local/apache/bin/httpd -k start
www      25386  0.0  0.0     0    0 ?        Z    11:32   0:00 [httpd
<defunct>]
evan     25418  0.0  0.0  1760  596 pts/3    R    11:32   0:00 grep
httpd

# ps auxw | grep httpd
root     11281  0.0  0.1  6872 1068 ?        S    Jan12   0:45
/usr/local/apache/bin/httpd -k start
evan     25495  0.0  0.0  1764  608 pts/3    S    11:32   0:00 grep
httpd

# ps auxw | grep httpd
root     11281  0.0  0.1  6872 1068 ?        S    Jan12   0:45
/usr/local/apache/bin/httpd -k start
evan     25503  0.0  0.0  1764  608 pts/3    S    11:32   0:00 grep
httpd
www      25504  0.0  0.1 19240 1464 ?        S    11:32   0:00
/usr/local/apache/bin/httpd -k start
www      25505  0.0  0.1 19240 1464 ?        R    11:32   0:00
/usr/local/apache/bin/httpd -k start
www      25506  0.0  0.1 19240 1464 ?        S    11:32   0:00
/usr/local/apache/bin/httpd -k start
www      25507  0.0  0.1 19240 1464 ?        S    11:32   0:00
/usr/local/apache/bin/httpd -k start
www      25508  0.0  0.1 19240 1464 ?        S    11:32   0:00
/usr/local/apache/bin/httpd -k start
www      25509  0.0  0.1 19240 1464 ?        S    11:32   0:00
/usr/local/apache/bin/httpd -k start
www      25510  0.0  0.1 19240 1464 ?        S    11:32   0:00
/usr/local/apache/bin/httpd -k start
www      25511  0.0  0.1 19240 1464 ?        R    11:32   0:00
/usr/local/apache/bin/httpd -k start


So I don't see what the problem is...

On Mon, 2003-01-20 at 11:23, Oskar 'Zoot' Lindgren wrote:
> I am trying to learn.
> 
> Lets say you are running a server for a school with 200 pupils that are
> learning php, perl and shtml. How can the school admin prevent all of them
> not to do this?
> 
> ----- Original Message -----
> From: "Boyle Owen" <Owen.Boyle@swx.com>
> To: <users@httpd.apache.org>
> Sent: Monday, January 20, 2003 5:19 PM
> Subject: RE: [users@httpd] Killing apache(bugg?)
> 
> 
> > >-----Original Message-----
> > >From: Oskar 'Zoot' Lindgren [mailto:oskar.lindgren@home.se]
> > >
> > >Hmm, I think this is a apache issue, since it works in nearly
> > >all script
> > >languages. And apache is the allways target that gets stoped.
> >
> > It is not an issue at all. CGIs and PHPs are server-sided scripts - they
> > run on the server. This cannot be done from the client-side.
> >
> > The only scripts that should run on the server are scripts that the
> > sysadmin puts there (or, at least, allows trusted users to put there).
> > What exactly are you worried about?
> >
> > Rgds,
> >
> > Owen Boyle
> >
> > This message is for the named person's use only. It may contain
> > confidential, proprietary or legally privileged information. No
> > confidentiality or privilege is waived or lost by any mistransmission.
> > If you receive this message in error, please notify the sender urgently
> > and then immediately delete the message and any copies of it from your
> > system. Please also immediately destroy any hardcopies of the message.
> > You must not, directly or indirectly, use, disclose, distribute, print,
> > or copy any part of this message if you are not the intended recipient.
> > The sender's company reserves the right to monitor all e-mail
> > communications through their networks. Any views expressed in this
> > message are those of the individual sender, except where the message
> > states otherwise and the sender is authorised to state them to be the
> > views of the sender's company.
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
-- 
Evan Borgstrom <evan@mirrored.ca>
Mirrored.ca - Canadian Mirror Archive
ve


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message