[pmwiki-users] Group Ownerships Getting Changed to Apache!

Patrick R. Michaud pmichaud at pobox.com
Sat Apr 21 14:45:09 CDT 2007


On Fri, Apr 20, 2007 at 05:44:04PM -1000, Sivakatirswami wrote:
> I am suddenly experiencing a strange (painful) phenomenon.
> 
> a) I have  this set in my local farmconf.php
> $WikiDir = new PageStore('wiki.d/{$Group}/{$FullName}');
> pages in groups are folderized.
> 
> b) I am suddenly no longer able to create new groups

If PHP is running in safe_mode and as the "apache" user,
then it's not possible for PmWiki to automatically create
the per-group folders.  Each has to be created manually
and then given write permissions to enable the "apache"
user to write to them.

> c) some group-folders are suddenly reverting to "apache" as the owner 
> and group for reasons that are not at all clear.  
> ...

Any files that are created by PmWiki will be owned
by whatever user PHP is running as.  PmWiki has no control
over this.

> Can anyone thing of any actions that would cause ownership and group to
> revert to  "apache" for directories in wiki.d?

If the PHP configuration was changed so that it was previously
running as the "wikihinduorg" user account but is now running
as "apache", that would explain it.  


> Links to pages in these groups 
> now appear with
> a question mark as if they don't exist. I have to log in from terminal 
> and manually
> 
> chown wikihinduorg  some-group-folder
> chgrp psacln  some-group-folder
> 
> and then they appear again.

This is very odd.  My suspicion is that the system administrators
have been switching around the user account that PHP is executing
under, either via "User" directives in the apache configuration
files, enabling/disabling suEXEC support, or something similar.

But it all comes back to the general principle that PmWiki
(indeed any PHP script) runs with whatever user privileges 
are assigned to it by the webserver.  So, if that changes
from one day to the next, then files and directories will
end up with different ownerships over time.

Hope this helps.

Pm



More information about the pmwiki-users mailing list