httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: Apache::Test oustanding issues
Date Wed, 30 Jul 2003 00:19:19 GMT
Welcome back, Geoff!

>> 2) We have a problem with Apache::Test running as root, since when 
>> Apache "sudoes" into 'nobody' it can't access files under /root or 
>> some other root owned dir. The current cvs version already tries to 
>> tell the user about the problem before starting to run the test suite.
> I've use A::T to test a SOAP server that runs as root, which means the 
> tests need to be run as root as well.
> the way I handled this was to add the following to my TEST.PL
>   # override root blocks
>   local *Apache::TestConfig::default_user = sub { return 'root' };
>   local *Apache::TestConfig::default_group = sub { return 'root' };

why do you need to run tests as root?

>   # and that nasty chown stuff
>   local *Apache::TestRun::adjust_t_perms = sub { 1 };

root can still work with files owned by 'nobody', but of course...

> which worked very well.
> now, I'm not suggesting TEST.PL changes as a fix, but couldn't we do 
> something similar behind the scenes if the user is running as root?

Sorry, I don't understand you? Do you suggest that the 'root' case should be 
optional? How does it help to solve our problem?

let me repeat what the problem is:

cd /root ; mkdir t ; chmod 0777 t ;
sudo -u 'nobody' perl -le 'print -r "t" && -w _ && -x _ ? "OK" : "NOK"'

if you can make it return 'OK', than the problem is solved.

>> Currently the only solution that was suggested is to copy t/ into /tmp 
>> and run the tests from there and then cleanup. T
> yucko!

Got a better idea?


Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message