[pmwiki-users] working directory

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 21 14:16:56 CST 2006


Neil writes:
> At 2006-02-17  01:40 PM -0600, Patrick R. Michaud is rumored to have said:
> >On a related note, I'm really desirous of having a standard directory
> >(other than wiki.d/ itself, although it could be a subdirectory of
> >wiki.d/) where cache files, index files, and other working files
> >could be safely kept.
> 
> How about working.d/  ???
> 
> Not an obvious name in anything other than English, but then scripts/ 
> and cookbook/ aren't either.

I'm thinking I will shorten this to work.d/, and use that.  This
would be the place for temporary files, and we could also see about
moving deleted pages into this directory (instead of leaving them
in wiki.d/).

However, this does have the downside of needing to create an extra 
.htaccess file to protect the work.d directory.

On another note, Hagan Fox once remarked that it would be nice to 
put all of these writable directories (wiki.d/, uploads/, work.d/) 
into a single directory -- something like:

    pmwiki/
      pmwiki.php
      local/
      scripts/
      cookbook/
      pub/
      data/
        uploads/
        work.d/
        wiki.d/
      wikilib.d/

One advantage of this is that the data/ directory can be exist as
part of the distribution, and we simply tell people to change its 
permissions to 777 or 2777 as appropriate when it's needed.  
(No more setting/unsetting permissions on the pmwiki root.)

Another advantage is that one .htaccess file in data/ can protect
that entire tree.  But then we'd need a second .htaccess file in
uploads/ to allow direct webserver access to uploads, or else ship 
PmWiki with $EnableDirectDownload turned off by default.

Of course, if we do something like this we would have in place
some transitional code (to exist for a long time into the 2.1
release) so that existing sites can continue to use the traditional
PmWiki directory structures.  OTOH, moving to the new structure
is as simple as renaming or moving a couple of directories, so
it's not as if the transition is difficult.

Comments?

Pm




More information about the pmwiki-users mailing list