I'm trying to enable mod_perl support for my TWiki-based website
(http://subwiki.honeypot.net/).  I'm seeing some really strange behaviour,
though, and I don't know which of mod_perl or I are going insane.

In my httpd.conf, I have:

    User www
    Group www

and it behaves in the expected way.  TWiki ships with a script called
`testenv' that shows some information about the current Apache environment,
and it calls some very simple code to determine the user its running as:

    my $usr = lc( getlogin || getpwuid($<) );
    print "<tr><th align=\"right\">User:</th><td>$usr</td></tr>\n";

When I execute that script from a browser, I see "User: root", and I'm not
sure where that's coming from.  Right now, the following httpd processes are
running on the server:

    # ps auxwww | grep -- -DSSL
    root   34839  0.0  0.9 14092 7032  ??  Ss   10:55AM   0:00.95 
/usr/local/sbin/httpd -DSSL
    www    35394  0.0  0.9 14100 7068  ??  I    11:11AM   0:00.01 
/usr/local/sbin/httpd -DSSL
    www    35395  0.0  0.9 14100 7064  ??  I    11:11AM   0:00.01 
/usr/local/sbin/httpd -DSSL
    www    35396  0.0  0.9 14160 7112  ??  I    11:11AM   0:00.02 
/usr/local/sbin/httpd -DSSL
    www    35397  0.0  0.9 14160 7120  ??  I    11:11AM   0:00.02 
/usr/local/sbin/httpd -DSSL
    www    35398  0.0  0.9 14160 7120  ??  I    11:11AM   0:00.02 
/usr/local/sbin/httpd -DSSL
    www    35403  0.0  0.9 14092 7040  ??  I    11:12AM   0:00.01 
/usr/local/sbin/httpd -DSSL

Doesn't the process running as root exist solely to spawn other children?
If so, why does Perl (both with and without mod_perl enabled) think that
it's running as root instead of www?
-- 
Kirk Strauser
In Googlis non est, ergo non est.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to