[BlueOnyx:26913] Re: How to open_basedir none correctly?

Juerg Sommer jsommer at emailto.ch
Tue Apr 16 12:20:33 -05 2024


Hi Michael,

> I am having problems with WordPress CLI scripts and open_basedir. The 
> BlueOnyx GUI page will not  accept the folder paths that need to be 
> allowed so I have been manually editing the php.ini to put a ; in 
> front of the open_basedir directive. That works but gets over written 
> every so often and then the errors come back.
>
> I have open_basedir allowed in both the server and vsite GUI configs 
> but that does not seem to actually do anything.
>
> I am sure I am doing something wrong but there is no search on the 
> mailing list archive any longer and google was no help with BlueOnyx 
> specifically.

CLI does not know for which Vsite a php script is executed, so Vsite 
config doesn't have any impact to CLI. Server config should work, but is 
a security hole. The best way is to change command line (in cron?)

Change
/usr/bin/php /path/to/script.php
to
/usr/bin/php -d open_basedir=none /path/to/script.php

This should work and would be the best solution.

Hope that helps.

Best regards,
Juerg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20240416/942f5d44/attachment.html>


More information about the Blueonyx mailing list