[BlueOnyx:18082] Re: Mysterious /web ownership change
Michael Stauber
mstauber at blueonyx.it
Wed Jul 22 21:07:36 -05 2015
Hi Chris,
> The only entries are from where we have manipulated the ownership to fix
> sites.
Weird.
> I wonder if perhaps it's not an issue of the sites having their
> permissions changed. The permissions have likely NOT been changed. So
> has a handler in Apache or PHP changed recently?
No, there hasn't been a PHP related change in a long while.
> This is truly puzzling. Right now I'm not sure the best method to fix
> other than going through site by site and updating the ownership. That
> will be time consuming, but if there is not a way to script it, then
> manual it shall be!
You got a few options here. This script is included in BlueOnyx:
/usr/sausalito/sbin/php_settings_convert.pl
It'll just walk through all Vsites and pushes the existing PHP Vsite
config out to the config files. It will neither change web ownership nor
settings. But if there is a web ownership configured in CODB, but the
file level disagrees, then it'll be fixed on the file level.
So this might not help. But it won't break anything.
Then I also got this script here:
http://d2.smd.net/.suPHP/suPHP-forced-on.txt
To use it do this:
wget http://d2.smd.net/.suPHP/suPHP-forced-on.txt
mv suPHP-forced-on.txt suPHP-forced-on.pl
chmod 755 suPHP-forced-on.pl
./suPHP-forced-on.pl
What it does is this:
It walks through all Vsites and checks if they have a siteAdmin. If a
Vsite has a siteAdmin, then suPHP will be enabled and that siteAdmin
will be used as "Web Owner". Meaning the /web folder will be chowned to
his username.
If a Vsite has no siteAdmin, then just regular PHP will be enabled and
the ownerships are left as they are. After all: suPHP *needs* a
siteAdmin as owner.
The only problem: The script doesn't care if a site has multiple
siteAdmins. It'll use the first siteAdmin that it runs into. If there
are multiple siteAdmins for that Vsite, then you might end up with a
different "Web Owner" than you actually might want to use. But usually
that shouldn't be an issue.
I used this script to forcibly convert all Vsites from regular PHP to
suPHP when I was too lazy to do it via the GUI.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list