[pmwiki-users] Cannot acquire lockfile
Marc Cooper
gmane at auxbuss.com
Sat Sep 9 08:24:31 CDT 2006
Patrick R. Michaud said...
> On Fri, Sep 08, 2006 at 07:27:25PM +0100, Marc Cooper wrote:
> > Hi,
> >
> > I just installed PmWiki 2.1.24 in a userdir - I usually run it from the
> > serverroot on Linux or a Windows' userdir, so this is a first, I think.
> >
> > After manually creating /wiki.d and /uploads, perms are 755, I get ye
> > olde message:
> >
> > Cannot acquire lockfile
> >
> > I can sidestep this by setting 777 or similar, but that's not what I
> > want to do. I've checked that PHP safe_mode is off.
>
> Short answer:
> If you manually create the directories, their permissions have to be
> 777. The only real way to avoid 777 permissions on the directories
> is to let the webserver create them instead of manually doing it.
Hi Patrick,
This isn't a deal breaker for me - far, far from it ;-)
However, when I searched for a 'fix', I found a lot of half-solutions,
and quite a few links to busted PmWikis! So, in part, this is an attempt
to put the 'right way' out there.
> Longer answer:
>
> - In order to work, PmWiki has to be able to create files in the
> wiki.d/ directory.
>
> - In a standard Apache/Unix environment, when PmWiki runs, it runs
> under the webserver account. Usually this is something like
> 'apache', 'www', or 'nobody'.
>
> - Ignoring unix groups, the only way a program running under a
> webserver account can create a file in a directory is if either
> (a) the webserver account owns the directory
> (b) the directory has "other" write permissions (i.e., 777)
>
> I know it stinks for things to be this way, but I'm not
> responsible for the way that Apache works.
:-)
> On the good side, if you let PmWiki create directories, it will
> give the directories and files it creates the minimum permissions
> needed to preserve access for itself and the account owner. Thus,
> if the wiki.d/ and uploads/ directories can be setgid (to the same
> group as the owner), then the files will end up without world write
> access.
Right. I wasn't sure what you meant, precisely, by this, so I opened
'tother machine, deleted wiki.d, and noticed that you spell it out in
the error message - somehow I missed this yesterday, but, of course, I
will swear that it wasn't there then ;-)
So, for the record:
1. chmod 2777 ~/public_html
2. Load/reload pmwiki.php
3. chmod 0755 ~/public_html
4. All done
--
Best,
Marc
More information about the pmwiki-users
mailing list