gorillaman has asked for the wisdom of the Perl Monks concerning the following question:

A perl program runs under the user "project". The program grabs a small flatfile and updates a value in it.

The problem is, sometimes, like maybe 1 out of 10 times, it changes that little flatfile's ownership to "root". I am baffled by this, and really don't know why this is happening. There is nothing in the code that changes permissions or ownership. But for it to be something that happens occasionally, it is hard to troubleshoot. I hope someone can shed some light on this. My theory is that maybe apache restarts and the cgi runs just at the split second before suExec starts up...?

This is on Red Hat Linux, with Apache 1.3.31, running suExec

Replies are listed 'Best First'.
Re: suExec problem
by hmerrill (Friar) on Aug 04, 2004 at 11:43 UTC
    I've been on Windoze for a while now, but in my previous life (6 months ago) I worked on RH Linux, and had some experience with suexec - maybe I can help.

    Apache maintains an suexec log doesn't it? Look in the apache logs directory and see if there's an suexec log in there. That log may give some hints as to what's going on - I think it logs every suexec event there.

    The apache error log tells you when apache starts and stops, so see if the timing coincides with your flat file ownership change problem.

    HTH.