[Gllug] [OT] Linux question - core dumps

rich at annexia.org rich at annexia.org
Mon Feb 17 09:01:55 UTC 2003


On Mon, Feb 17, 2003 at 01:20:28AM +0000, Simon A. Boggis wrote:
> On Sat, 2003-02-15 at 23:48, rich at annexia.org wrote:
> > 
> > Sorry to post an off-topic question to this political discussion group ...
> > 
> > I have a server which is running as 'nobody' (actually it starts running
> > as root and setuid/setgids to this user). It is running in a directory
> > called /tmp/cores/ which is 0755, chowned to nobody.nogroup. I've also
> > called 'ulimit -c unlimited'. Despite this, the server refuses to dump
> > core if it crashes. This is really annoying because it makes it very
> > hard to debug the server (it crashes about once every 5 days).
> > 
> > Any ideas how to force it to dump core???
> > 
> > Rich.
> 
> This is a question which has vexed me in the past too - I've never found
> the answer (i.e. what the rules are supposed to be), although it may be
> that I didn't look hard enough. I think the other respondent who says
> that it is kernel restricted is right, or at least that's what I've
> heard from somewhere.
> 
> I've done a few experiments (using the attached crappy test program).
> 
> 1) running it as root with argument 0 (i.e. don't change uid/gid) it
> dumps core
> 2) running it as a normal user with argument of user's uid it dumps core
> 3) running it as root with another user's uid it doesn't dump core.

I found the answer to this ...

http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#suidcore

I verified that this does actually work when the appropriate statement
is added to your test program.

Rich.

-- 
Richard Jones, Red Hat Inc. (London, UK) http://www.redhat.com/software/ccm
http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj
MONOLITH is an advanced framework for writing web applications in C, easier
than using Perl & Java, much faster and smaller, reusable widget-based arch,
database-backed, discussion, chat, calendaring:
http://www.annexia.org/freeware/monolith/

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list