safe_mode of PHP in Perl

H

hakim

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
 
G

Gunnar Hjalmarsson

hakim said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top