Hi,
I've been struggling to change the open_basedir setting on a CentOS 7 server running apache 2.4 and php-fpm 7.3.
I want to add a directory (/mnt/mediastorage/) to the open_basedir path but whenever or wherever I change the setting, it doesn't seem to work. I've used suggestions from this post amongst others https://help.directadmin.com/item.php?id=672
What I tried:
- Modify custom httpd configuration https://help.directadmin.com/item.php?id=182
- Another way of modifying through custom httpd config https://help.directadmin.com/item.php?id=636
- Use a .user.ini file https://help.directadmin.com/item.php?id=682
- Edit the main php.ini file AND add a custom .ini file as described here https://help.directadmin.com/item.php?id=622
phpinfo() gives:
It does show the additional 30-openbasedir.ini being parsed which contains this line:
open_basedir = "/home/user/:/mnt/mediastorage/:/tmp/:/var/tmp/:/opt/alt/php73/usr/share/pear/:/dev/urandom:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/php56/lib/:/usr/local/lib/php/"
Each time I made a change I restarted the php-fpm & httpd processes. Result is always the same, open_basedir isn't changed/overriden.
I guess I'm missing something, anybody have an idea?
I've been struggling to change the open_basedir setting on a CentOS 7 server running apache 2.4 and php-fpm 7.3.
I want to add a directory (/mnt/mediastorage/) to the open_basedir path but whenever or wherever I change the setting, it doesn't seem to work. I've used suggestions from this post amongst others https://help.directadmin.com/item.php?id=672
What I tried:
- Modify custom httpd configuration https://help.directadmin.com/item.php?id=182
- Another way of modifying through custom httpd config https://help.directadmin.com/item.php?id=636
- Use a .user.ini file https://help.directadmin.com/item.php?id=682
- Edit the main php.ini file AND add a custom .ini file as described here https://help.directadmin.com/item.php?id=622
phpinfo() gives:
Loaded Configuration File | /usr/local/php73/lib/php.ini |
Scan this dir for additional .ini files | /usr/local/php73/lib/php.conf.d |
Additional .ini files parsed | /usr/local/php73/lib/php.conf.d/10-directadmin.ini, /usr/local/php73/lib/php.conf.d/30-openbasedir.ini, /usr/local/php73/lib/php.conf.d/50-webapps.ini |
open_basedir | /home/user/:/tmp/:/var/tmp/:/opt/alt/php73/usr/share/pear/:/dev/urandom:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/php56/lib/:/usr/local/lib/php/ | /home/user/:/tmp/:/var/tmp/:/opt/alt/php73/usr/share/pear/:/dev/urandom:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/php56/lib/:/usr/local/lib/php/ |
It does show the additional 30-openbasedir.ini being parsed which contains this line:
open_basedir = "/home/user/:/mnt/mediastorage/:/tmp/:/var/tmp/:/opt/alt/php73/usr/share/pear/:/dev/urandom:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/php56/lib/:/usr/local/lib/php/"
Each time I made a change I restarted the php-fpm & httpd processes. Result is always the same, open_basedir isn't changed/overriden.
I guess I'm missing something, anybody have an idea?