moving logs, tmp and config file above web folder

Discussion in 'ISPConfig 3 Priority Support' started by pawan, Oct 25, 2018.

  1. pawan

    pawan Member

    as recommended in some other threads, I tried to move these files in private folder of the website.
    but I am getting the error like below:
    Code:
    [Thu Oct 25 18:53:08.060557 2018] [fcgid:warn] [pid 9779:tid 139916344227584] [client 207.46.13.27:22588] mod_fcgid: stderr: PHP Warning:  require_once(): open_basedir restriction in effect. File(/var/www/clients/client63/web124/private) is not within the allowed path(s): (/var/www/clients/client63/web124/web:/var/www/clients/client63/web124/joomla:/var/www/clients/client63/web124/tmp:/var/www/indianpublicschool.in/web:/srv/www/indianpublicschool.in/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/usr/share/php:/usr/share/php/pear) in /var/www/clients/client63/web124/web/configuration.php on line 2
    [Thu Oct 25 18:53:08.060609 2018] [fcgid:warn] [pid 9779:tid 139916344227584] [client 207.46.13.27:22588] mod_fcgid: stderr: PHP Warning:  require_once(/var/www/clients/client63/web124/private): failed to open stream: Operation not permitted in /var/www/clients/client63/web124/web/configuration.php on line 2
    [Thu Oct 25 18:53:08.060618 2018] [fcgid:warn] [pid 9779:tid 139916344227584] [client 207.46.13.27:22588] mod_fcgid: stderr: PHP Fatal error:  require_once(): Failed opening required '/var/www/clients/client63/web124/private' (include_path='.:/opt/phpfcgi-5.4.45/lib/php') in /var/www/clients/client63/web124/web/configuration.php on line 2
    
    I also tried to add open_basedir for joomla folder above web folder, but I am not able to create the folder above root.
    I checked the folder web124 for lsattr but didn't find any attribute set on that folder.
    How I can resolve this?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    add:

    ":/var/www/clients/client63/web124/web"

    at the end of the paths in the open basedir field of the site (without the quotes).

    The private folder is created by ispconfig automatically, no need to add it. and in the private folder, you can create subfolders. Folders in root shall not be added, that#s why the system denies this to all users incl. root. You can remove the folder protection with chattr -i, but it is highly recommended to not do that and to not create folders in root folder manually.
     
  3. pawan

    pawan Member

    Thanks Till:
    but in the error logs ":/var/www/clients/client63/web124/web" is already within the allowed paths, why that needs to be added again?
    I have created folders "logs" 'tmp" and file "configuration.php" in private folder above root, where I am getting the open_basedir in effect.
    do you mean if this is before, that restriction will come into effect?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    sorry, I meant to add:

    ":/var/www/clients/client63/web124/private"
     
    pawan likes this.
  5. pawan

    pawan Member

    Thanks.
     

Share This Page