Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

problems with Apache::Test when run under root: msg#00000

apache.httpd.test.devel

Subject: problems with Apache::Test when run under root

Several people reported problems with the same test in mod_perl 2.0. Only now I've figured why: they run the test suite while logged as 'root', which was absolutly non-obvious.

When this happens Apache::Test starts the server under user 'nobody' if such exists, or dies otherwise. When the server is started under that username, the test suite can't create dirs and files because they aren't owned by that user 'nobody'... the test suite fails.

I suggest we kill that 'nobody' workaround, and just die if the test suite is started as root.

Prompting for another username as suggested by XXX below will lead to the same problem.

diff -b -u -r1.144 TestConfig.pm
--- Apache-Test/lib/Apache/TestConfig.pm 2 Dec 2002 16:11:48 -0000 1.144
+++ Apache-Test/lib/Apache/TestConfig.pm 3 Dec 2002 14:20:50 -0000
@@ -444,16 +444,7 @@

my $user = $ENV{APACHE_USER} || (getpwuid($uid) || "#$uid");

- if ($user eq 'root') {
- my $other = (getpwnam('nobody'))[0];
- if ($other) {
- $user = $other;
- }
- else {
- die "cannot run tests as User root";
- #XXX: prompt for another username
- }
- }
+ die "cannot run tests as User root" if $user eq 'root';

$user;
}


__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
version-control...    qnx.openqnx.dev...    redhat.rhn.user...    ietf.openpgp/20...    mail.mutt.user/...    web.microformat...    java.sync4j.use...    education.ezpro...    user-groups.blu...    solaris.manager...    org.fitug.debat...    technology.erps...    politics.activi...    linux.redhat.fe...    bug-tracking.ma...    xfce.user/2004-...    hams/2004-11/ms...    kde.users.pim/2...    culture.cooking...    freebsd.devel.x...    gnu.m4.adhoc/20...    ngpt.user/2002-...    apple.fink.deve...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation