You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Glenn Sieb <ra...@wingfoot.org> on 2003/05/15 07:11:35 UTC

Mod_Perl problem, or just bad code?

Good evening.. :)

I am running FreeBSD 4.8-STABLE with Apache 1.3.27 and mod_perl 1.27, all
installed from ports.

In my httpd.conf I have:
User www
Group www
<Directory "/home/ges/public_html/twiki/bin">
   #Tried the SetEnv after looking through the archives.. no luck
   SetEnv USER www
   Options ExecCGI
   AddHandler perl-script
   SetHandler perl-script
   PerlHandler Apache::Registry
   PerlSendHeader On
   Allow from all
   AuthUserFile /home/ges/public_html/twiki/data/.htpasswd
   AuthName 'Enter your WikiName: (First name and last name, no space, no
dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have
one.'
   AuthType Basic
</Directory>

Now.. when I reboot my server fresh, and I run TWiki's little testenv
script, I see this disturbing fact:

mod_perl:	Used for this script (mod_perl loaded)
User:	root
	Note: Your CGI scripts are executing as this user.
	Warning: Since your CGI script is not running as user nobody, you need to
change the locks in the *,v RCS files of the TWiki distribution from
nobody to root. Otherwise, changes to topics will not be logged by RCS.

If I restart apache, after su - 'ing to root, I get:

mod_perl:	Used for this script (mod_perl loaded)
User:	ges
	Note: Your CGI scripts are executing as this user.
	Warning: Since your CGI script is not running as user nobody, you need to
change the locks in the *,v RCS files of the TWiki distribution from
nobody to ges. Otherwise, changes to topics will not be logged by RCS.

I would like to know two things...

1) How do I verify that this is actually the case (running scripts as the
wrong user, not www)?

2) If this is the case, how can I fix it? :-/  Running cgi as root is..
well.. just a Bad Idea(tm). Running them as me is not *as* evil, but I'd
prefer they run as www.

I appreciate any help anyone can send my way...

Thank you for your time :)
Glenn
(BTW.. just an odd aside--the list-post header still says:
<ma...@apache.org>--all the other list-* headers are correct...)

---
The original portions of this message are the copyright of the author
(c)1998-2002 Glenn E. Sieb.    IRC: Rainbear    Yahoo: Rainbear_NJ "All
acts of Love and Pleasure are Her rituals" Charge of the Goddess