Wrong TMP folder in user-specific php.ini

Discussion in 'General' started by SnakeX91, Apr 2, 2013.

  1. SnakeX91

    SnakeX91 New Member

    Hello everyone!

    I've got another question to answer...

    When i set up a website (SuPHP+suEXEC), ISPConfig create an /var/www/conf/web{WEB_ID}/php.ini that contains the php configuration for web{WEB_ID}. But when I try to upload a file in each way (via CMS or self-made upload script), i get an open_basedir restriction, 'cause /var/tmp/ is not in the list of the open_basedir. In fact in php.ini i find /var/tmp/ as temporary folder for uploads.

    Now, I know how is foolish to disable open_basedir for security reasons, but i think that ISPConfig has to set /var/clients/client{client_id}/web{web_id}/tmp/ as tmp folder for upload and NOT /var/tmp/. How can i get out of this?
  2. falko

    falko Super Moderator ISPConfig Developer

    ISPConfig just copies your default php.ini /var/www/conf/web{WEB_ID}/php.ini.

    You can add /var/tmp to open_basedir on the Options tab of the website in ISPConfig.
  3. SnakeX91

    SnakeX91 New Member

    Hi falko, thanks for your answer!

    Yes, i can add /var/tmp/ in Options tab but... why?
    Probably my opinion is wrong, but if ISPConfig creates a /tmp/ folder for each web{ID}, why to set /var/tmp/ to the default value if it's not accessible by default?

    I can't understand if it is a missing feature, or if my opinion is incorrect. If it is a missing feature, I'd really like to implement it by myself and release it open-source & free. Could you explain me?

    Thank you so much!
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig is not setting /var/tmp as temporary folder. If this folder is used in your php.ini file, then it has been set by the php package maintainer of your Linux distribution and not by ispconfig.

    The combination suphp + suexec does not make much sense fo php as suexec replaces suphp. suphp is very slow and should not be used anymore, the recommended php settings as described in the manual are php-fcgi + suexec or php-fpm + suexec. You will see that the upload temp folder is set by ispconfig then as well.

Share This Page