open_basedir /tmp ? oO

Discussion in 'General' started by almere, Aug 14, 2013.

  1. almere

    almere Member HowtoForge Supporter

    Hello.

    I just found out, the the open base_dir at every site contains "/tmp" => server tmp directory. Why it's doing there while /var/www/clients/client111/web111/tmp also exists in the open_basedir.

    Thank's
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Some scripts and cms systems rely on having access to /tmp on the server, thats hardcoded into their code, so /tmp should be part of the open_basedir. The directory /var/www/clients/client111/web111/tmp is used for uploaded files and sessions in php by default.
     
  3. almere

    almere Member HowtoForge Supporter

    Ehm.. Is it not dangerous?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If a developer uses the global /tmp directory, he knows that all data in this directory is accessible by everyone else on the same server. So yes, this directory should normally not be used. But there are custom applications and scripts out there which use it nevertheless and they will fail if you deny access to /tmp. And the purpose of the /tmp directory is to be accessible by every user on a Linux system to store temporary files. If you dont want to have /tmp accessible on your server e.g. because none of your customers use scripts that require /tmp access, then you can remove it from the open_basedir default setting under System > server config.
     
  5. almere

    almere Member HowtoForge Supporter

    Beautiful explanation. Thank's
     

Share This Page