safe_mode of PHP in Perl

Discussion in 'Perl Misc' started by hakim, Mar 5, 2006.

  1. hakim

    hakim Guest

    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
    hakim, Mar 5, 2006
    #1
    1. Advertising

  2. A. Sinan Unur, Mar 5, 2006
    #2
    1. Advertising

  3. 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
    Gunnar Hjalmarsson, Mar 5, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ted Zeng
    Replies:
    4
    Views:
    474
    Tim Arnold
    Oct 3, 2006
  2. Ted Zeng
    Replies:
    0
    Views:
    602
    Ted Zeng
    Oct 13, 2006
  3. Rajive Narain
    Replies:
    0
    Views:
    1,538
    Rajive Narain
    Sep 18, 2009
  4. Ignoramus6539
    Replies:
    2
    Views:
    193
    Colin McKinnon
    Aug 30, 2006
  5. M. Strobel
    Replies:
    1
    Views:
    200
    The Natural Philosopher
    Mar 5, 2013
Loading...

Share This Page