Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > safe_mode of PHP in Perl

Reply
Thread Tools

safe_mode of PHP in Perl

 
 
hakim
Guest
Posts: n/a
 
      03-05-2006
Hello,

I am running a webserver. I offer PHP in safe_mode, that means:

When safe_mode is on, PHP checks to see if the owner of the current
script matches the owner of the file to be operated on by a file
function or its directory. For example:

-rw-rw-r-- 1 rasmus rasmus 33 Jul 1 19:20 script.php
-rw-r--r-- 1 root root 1116 May 26 18:01 /etc/passwd

Running this script.php
<?php
readfile('/etc/passwd');
?>
results in this error when safe mode is enabled:

Warning: SAFE MODE Restriction in effect. The script whose uid is 500
is not
allowed to access /etc/passwd owned by uid 0 in /docroot/script.php on
line 2


Is there a similar way to configure perl or mod_perl. I would like to
offer Perl to my customers to run their own CGI-Scripts, if they want.
I don't want them to read files others then their own homedirectory.

Thanks a lot...

Achim

 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      03-05-2006
"hakim" <(E-Mail Removed)> wrote in news:1141576408.896833.86720
@u72g2000cwu.googlegroups.com:

> I am running a webserver. I offer PHP in safe_mode, that means:


....

> Is there a similar way to configure perl or mod_perl.


I found the following discussion interesting and informative:

http://gallery.menalto.com/node/3017

--
A. Sinan Unur <(E-Mail Removed)>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html

 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      03-05-2006
hakim wrote:
> I am running a webserver. I offer PHP in safe_mode, ...
>
> Is there a similar way to configure perl or mod_perl. I would like to
> offer Perl to my customers to run their own CGI-Scripts, if they want.
> I don't want them to read files others then their own homedirectory.


suEXEC would at least prevent them from reading files that aren't world
readable.

http://httpd.apache.org/docs/2.0/suexec.html

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: getting perl and php to talk to each other, was Re: randomlysorting files in php M. Strobel Perl Misc 1 03-05-2013 07:20 PM
PHP Training Institute In Delhi, Live Projects on PHP. Short TermPHP Courses, PHP Scripts, PHP Training with Live Projects. Rajive Narain Java 0 09-18-2009 10:47 AM
RE: php and python: how to unpickle using PHP? Ted Zeng Python 0 10-13-2006 12:11 AM
php and python: how to unpickle using PHP? Ted Zeng Python 4 10-03-2006 03:07 PM
PHP/Perl/Unix Virus: delete config.php files asap Ignoramus6539 Perl Misc 2 08-30-2006 08:22 PM



Advertisments