howto safemode off + basedir on ?

Discussion in 'Tips/Tricks/Mods' started by radim_h, Nov 6, 2010.

  1. radim_h

    radim_h Member HowtoForge Supporter

    When i uncheck safemode for site , which means safemode = off
    then also basedir directives as
    php_admin_value open_basedir /var/www/webXXX/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/webXXX/phptmp/
    php_admin_value session.save_path /var/www/webXXX/phptmp/
    are gone from apache config file...
    .
    What should i change to have basedir directives in Vhosts_ispconfig.conf when safemode is Off as default

    Eg
    php_admin_flag safe_mode Off
    php_admin_value open_basedir /var/www/webXXX/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/webXXX/phptmp/
    php_admin_value session.save_path /var/www/webXXX/phptmp/

    I tried to find it somewhere in templates in /root/ispconfig/isp/conf but haven't find

    Now i'm solving situatuon by adding basedir directive in Apache config field in ISPC, but i'd like to turn safemode off for all sites (about 250), so this is bad solution

    Any hint please ??
     
    Last edited: Nov 6, 2010
  2. necromncr

    necromncr New Member

    What you're looking for is file vhost.conf.master in /root/ispconfig/isp/conf directory.

    Note however, basedir is not the silver bullet, it can cause quite some nasty issues with /tmp dir (which I hope you have noexec mounted).

    I myself went on into setfacl-ing all directories and files to include www-data user (for debian).
     
  3. radim_h

    radim_h Member HowtoForge Supporter

    Yes, but what to modify in
    In root/ispconfig/isp/conf/vhost.conf.master ?
    there is just {PHP}
    so where is the conf file for {PHP} ?


    can you write more about noexec mounting of /tmp please ?
    i'm using debian also
     
    Last edited: Nov 7, 2010
  4. falko

    falko Super Moderator ISPConfig Developer

    It's in the function make_vhost() in /root/ispconfig/scripts/lib/config.lib.php.
     

Share This Page