[pmwiki-users] Cannot acquire lockfile

Patrick R. Michaud pmichaud at pobox.com
Fri Sep 8 17:10:27 CDT 2006


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.

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.

Pm




More information about the pmwiki-users mailing list