Unable to axxess folder outside of the website using PHP

Discussion in 'Installation/Configuration' started by lioloprod, Nov 13, 2024.

  1. lioloprod

    lioloprod New Member

    Hi, good day. Well, I have been using ISPconfig for more than 10 years and it is great, since then I have been following the tutorial called THE PERFECT SERVER, with excellent results.
    Scenario:
    1. I am testing a new server,
    2. I even tried two versions of rhel 9.4, Almalinux and Rocky , both running remi PHP 8.2, I am trying to install Nextcloud 28 with dat dir in a different location. SAME ERROR on both.
    3. I even downgraded PHP to 8.1, trying to copy the configuration from another server that works ok.
    Results:
    All works great as usual with ISPconfig but when I add the route that is located outside the WEBSITE STRUCTURE
    WEBSITE > OPTIONS > PHP open_basedir > : DIR_OUT_OF_WEB
    ERROR HAPPENS BECAUSE THE NEW ADDED LOCATION ON open_basedir is NOT recognized and WILL NOT WORK.
    I tried completely disabling the open_basedir by writing "none". then tried " :/" but the open_basedir configuration written in the box HAS NO EFFECT. I EVEN SEARCHED ON php.ini and httpd.conf but all seems ok.
    I even tried to create symlink and used this option by checking on it:
    "Deactivate symlinks restriction of the web space"
    I simply cannot obtain access to folders and files outside the open_basedir, EVEN IF I ADDED THE CORRECT PATH TO IT.
    I HAVE SPENT THE LAST MONTH TRYING TO MAKE THIS WORK BUT I CANNOT. PLEASE HELP.
    The peculiar thing is that 9 months ago I made a server with same characteristics and all works great, NO errors and open_basedir working just fine.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This sounds as if your issue is not the open_basedir but other Linux filesystem permissions that prevent access. You can test this using phpinfo(); command in PHP or look into the PHP-FPM pool file when using PHP-FPM mode. Set the desired open_basedir and wait until the config has been written. Also take care to not enable php chroot, as this is a function to prevent PHP scripts to access files outside of the website

    Also as a note, neither AlmaLinux nor Rocky Linux are supported and we do not provide a perfect server guide for them. If you want to have a reliable setup, use Debian 12 or Ubuntu 24.04 with the auto-installer.

    And please do not re-open old threads; you posted to an 11-year-old thread. I have moved your post to a new thread.
     
    ahrasis likes this.

Share This Page