Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Advocacy

ModPerl Questions

 

 

ModPerl advocacy RSS feed   Index | Next | Previous | View Threaded


cbaltaci at turkisp

Dec 23, 2005, 5:06 AM

Post #1 of 2 (6317 views)
Permalink
ModPerl Questions

Hi,

My Webserver is Apache/2.0.40 with Perl 5.8.0 and mod_perl-1.99_07-5 on a
RH9 box.

A simple perl script can see everything on the server. The sys user of
domain.com is xxx and home directory of this user is
/home/httpd/domain.com/htdocs. I want to make a setting, that the xxx user
can do something only in the homedirectory.

Is there a soluion?

--- dumy.pl ---
#!/usr/bin/perl

print "Content-type:text/html\n\n";

foreach my $var (sort keys %ENV) {
print $var . "=" . $ENV{$var} . "<br>\n";
}

@x = `cat /etc/passwd`;
print "<pre>";
print "@x";
print "</pre>";



--- in conf file ---

<Directory /home/httpd/domain.com/htdocs>
<IfModule mod_perl.c>
<Files ~ (\.pl)>
SetHandler perl-script
PerlHandler ModPerl::Registry
Options ExecCGI
allow from all
PerlSendHeader On
</Files>
</IfModule>



Best Regards
Cihangir


---------------------------------------------------------------------
To unsubscribe, e-mail: advocacy-unsubscribe [at] perl
For additional commands, e-mail: advocacy-help [at] perl


frank at wiles

Dec 23, 2005, 9:40 AM

Post #2 of 2 (5851 views)
Permalink
Re: ModPerl Questions [In reply to]

On Fri, 23 Dec 2005 15:06:21 +0200
"A. Cihangir Baltaci" <cbaltaci [at] turkisp> wrote:

> Hi,
>
> My Webserver is Apache/2.0.40 with Perl 5.8.0 and mod_perl-1.99_07-5
> on a RH9 box.
>
> A simple perl script can see everything on the server. The sys user of
> domain.com is xxx and home directory of this user is
> /home/httpd/domain.com/htdocs. I want to make a setting, that the xxx
> user can do something only in the homedirectory.
>
> Is there a soluion?

This isn't really the right list for this type of question, you want
to use the modperl [at] perl list for this.

But the short answer, if I'm understanding your question correctly,
is yes and no. No in that there isn't any magic jailing code you
can include, but yes in the fact that if the user's perl script
is running as their user then while they may be able to SEE many
files they can't do anything with them due to the unix file
permissions.

---------------------------------
Frank Wiles <frank [at] wiles>
http://www.wiles.org
---------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: advocacy-unsubscribe [at] perl
For additional commands, e-mail: advocacy-help [at] perl

ModPerl advocacy RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.