open_basedir restriction in effect.

Discussion in 'ISPConfig 3 Priority Support' started by pawan, Feb 8, 2017.

  1. pawan

    pawan Member

    I am getting these error on a laravel application. I don't want to completely disable the open_basedir restriction. but want to give permission for required directories only.
    Code:
    Warning: require(): open_basedir restriction in effect. File(/var/www/clients/client1/web1/web/../megashopping_dk_files/bootstrap/autoload.php) is not within the allowed path(s): (/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/private:/var/www/clients/client1/web1/tmp:/var/www/megashopping.dk/web:/srv/www/megashopping.dk/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom) in /var/www/clients/client1/web1/web/index.php on line 21
    
    Warning: require(/var/www/clients/client1/web1/web/../megashopping_dk_files/bootstrap/autoload.php): failed to open stream: Operation not permitted in /var/www/clients/client1/web1/web/index.php on line 21
    
    Fatal error: require(): Failed opening required '/var/www/clients/client1/web1/web/../megashopping_dk_files/bootstrap/autoload.php' (include_path='.:/usr/share/php') in /var/www/clients/client1/web1/web/index.php on line 21
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Add the directories to the open_basedir setting on the options tab of the website, separated by ":"
     
  3. pawan

    pawan Member

    Hi Till can you give me a snippet how I will include it.
    for example in the Apache_directive under options tab - If I include say -
    Code:
    php_admin_value open_basedir "/var/www/megashopping.dk/web:/var/www/megashopping.dk/web//megashopping_dk_files"
    it the above correc?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There is a field named open_basedir, there you add the path only, no apache directives or php.ini valueslike in your example. The string that needs to be added at the end of the open_basedir field is:

    :/var/www/clients/client1/web1/megashopping_dk_files
     
    pawan likes this.

Share This Page