> I have this script stolen and modified from somewhere 

Stealling is bad! :)

> 
> #!/usr/bin/perl -w
> use strict;
> use File::Find;
> print "Content-type: text/html\n\n";
> 
> my $u=shift;
> my $sizes = 0;
> # replace this with your absolute path
> my $path = "/home/$u/";
> 
> find (sub {$sizes += -s ;}, $path);
> print  "$sizes\n";
> 
> 
> I am logged onto my machine as user owen and am root. From 
> the command line I execute
> 
> perl  /var/www/cgi-bin/ff1.cgi owen     with the result
> 
> --------------------------
> Content-type: text/html
> 
> (warnings snipped)
> 
> 504137000
> ---------------------------
> 
> with rcook as the user in /home the result is 988865
> 
> Now when I do 'links http://localhost/cgi-bin/ff1.cgi?owen'
> 
> the result is 350200607 (vs 504137000 ???) and 
> for user rcook the result is 0 (vs 988865)
> 

Permissions Permissions Permissions: 

The user the webserver is runnign at obvioulsy doesn't have 
permissions to "see" all the files that the user you where 
logged in as did. And it is not allowed to see the rcook directory at 
all aparently.

HTH

Dmuey

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to