[BlueOnyx:27308] Re: suPHP and wwwroot ownership error

Michael Stauber mstauber at blueonyx.it
Sun Nov 3 01:11:13 -05 2024


Hi Ken,

> Would it be possible to have the server automatically check the wwwroot 
> ownership when doing that change.

Yeah, that may be a good idea. I'll look into it.

> Also, is it possible to run aliased scripts outside of web when using 
> suPHP? CUrrent'y I am not able to

What do you mean with aliased scripts? Generally you can run PHP scripts 
from the shell or within cronjobs regardless if they are in the webroot 
or elsewhere.

Example:

sudo -u <siteAdmin> -g <siteGroup> /home/solarspeed/php-8.3/bin/php -c 
'' /path/to/script.php

All in one line.

The "sudo -u <siteAdmin> -g <siteGroup>" will execute the command with 
the specified UID and GID.

And in the above example it would execute /path/to/script.php with the 
PHP CLI command from PHP-8.3. The "-c ''" will override php.ini and will 
run PHP with the default settings, so that open_basedir isn't an issue.

You could instead specify an alternate php.ini like this: "-c 
/path/php.ini" and make whatever changes you see fit in that php.ini

-- 
With best regards

Michael Stauber


More information about the Blueonyx mailing list