0
Answered

File Permission Problem

visioncraft 2 years ago updated 2 years ago 7

I had filerun working fine on my Ubuntu server with PHP 7, but the installation is now pulling an error:

Warning: is_dir(): open_basedir restriction in effect. File(/home) is not within the allowed path(s): (/home/admin/web/[domain.com]/public_html:/home/admin/tmp) in /home/admin/web/[domain.com]/public_html/system/modules/fileman/sections/default/php/index.php on line 9
The path of your home folder doesn't point to an existing folder. Please contact the site administrator.

Yet, according to the php info file, open_basedir is set to the home directory. What could be the problem here and how might I fix it?

Answer

Answer
Answered
according to the php info file, open_basedir is set to the home directory

Given the error, the path "/home" is obviously not listed in "open_basedir". "/home/admin/tmp" is. I recommend you to review your PHP settings, and use for the FileRun users, paths that are allowed.

Answer
Answered
according to the php info file, open_basedir is set to the home directory

Given the error, the path "/home" is obviously not listed in "open_basedir". "/home/admin/tmp" is. I recommend you to review your PHP settings, and use for the FileRun users, paths that are allowed.

Yet, the info.php file clearly lists:

open_basedir/homeno value

Even more strangely, the file permissions worked until recently... and then stopped working. 

Is the "info.php" file you are looking at located inside "/home/admin/web/[domain.com]/public_html/"?

I think I may have found (at least part of) the problem, though. My browser was opening the https version, which fails, but the http (non-encrypted) version works fine. I do have a valid ssl certificate, though, so what would I need to do to make the https version work?

So you have two different PHP configurations, one for HTTP and one for HTTPS. It's not recommended as it leads to confusion such as in this case.

OK, I finally found the problematic configuration file and fixed it. Thanks for your help!