Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Dec 2002
    Posts
    11

    Default Please help with open_basedir!

    Hi, I have like 20 clients on my server and each of them has his own VirstualHost entry in httpd.conf.

    I want to set php open_basedir directive for every client, so that they will be able to include files only from their home directories.

    I dont want to write

    php_admin_value open_basedir &/home/client/&

    in every VirtualHost entry

    Is there any solution to do it for all clients with one line?

    Thanks

  2. #2
    Member
    Join Date
    Dec 2002
    Posts
    11

    Default

    anybody? please help!

  3. #3
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default

    I don't think it's possible .

    In every case open_basedir you are not safe ; your clients will still be able to see /etc/passwd and other files .

    At this time only safe solution is php safe mode (however it's too much restrictive ) .

    Bye

    p.s. Anyone knows if something changed with php 4.3.0 , regarding the security iussues related to php safe mode and the usage of open_basedir ?
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  4. #4
    Member
    Join Date
    Dec 2002
    Posts
    11

    Default

    In pair with with open_basedir I also use disable_function to disabale functions: system(), readfile()

    What if I have 100 clients on one machine? That means that I have to add to every VirtaulHost something like:

    &Virtual host xxx.xxx.xxx.xxx&

    php_admin_value open_basedir &/home/[user]/&
    php_admin_value disable_functions &system, readfile&

    ....
    ....

    &/Virtual host&


    ???

    This will take a lot of time!

  5. #5
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default

    someone on my server was able to install
    and run phpmyshell http://www.digitart.com.mx/php/myshell/security.html

    I was using openbase dir on that user . As can you see openbasedir is not useful to be safe .
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  6. #6
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Very interesting scipt. And I can see the problem of not being able to keep user in right directory, as the script runs as the webserver ID &nobody in most cases& and not the user. And since the webserver has read access to almost everywhere that's why it gets through.

    This is the same issue with several scripts out there that mimic shell access, they run as webserver ID and not the user themselves.
    Regards,
    David
    Forum Moderator

Similar Threads & Tags
Similar threads

  1. Need help with Open_basedir for suphp
    By zigzam in forum Security
    Replies: 6
    Last Post: 11-25-2010, 12:14 AM
  2. open_basedir value issue
    By asro in forum New User Questions
    Replies: 3
    Last Post: 02-25-2010, 05:35 AM
  3. Need help with Open_basedir for suphp
    By zigzam in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-16-2010, 03:52 AM
  4. open_basedir
    By daltonc in forum Security
    Replies: 3
    Last Post: 10-13-2006, 03:19 PM
  5. open_basedir
    By Radio_Head in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-02-2002, 02:56 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube