ISPconfig2 - BUG: wrong tmp_dir w. safe_mode off (mod_php)

Discussion in 'Developers' Forum' started by Ben, Jun 15, 2008.

  1. Ben

    Ben Active Member Moderator

    Hi,

    I think it's a bug, but I will start it with a question,
    why is the upload_tmpdir set to the default and not explicitly to the user's one, when safe_mode is off? Because open_basedir restriction will avoid writing to the general one.

    So I'd suggest adding the following line to /root/ispconfig/scripts/lib/config.lib.php (aroung line 1458, else block)
    PHP:
    $php .= "\nphp_admin_value upload_tmp_dir ".$mod->system->server_conf["server_path_httpd_root"]."/"."web".$web["doc_id"]."/phptmp/";
    And also the line for the open_basedir must be added then.
     
    Last edited: Jun 15, 2008
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    As far as I know, OpenBasedir is not set when safemode is off, that why php uses the global temp directory in this case.

    It might be problematic to enable openbasedir when safemode is off beacuse poeple might use php files from outside their website directories in their current setups and we would break their setups with this change.

    Maybe we can add this as an option in config.inc.php.
     
  3. Ben

    Ben Active Member Moderator

    ah i see.... I am using open_basedir if safe mode off, that's why I cam to this "bug"...

    But for security reasons I personally would not abondon open_basedir.
     

Share This Page