[Pmwiki-users] Call For Directory Simplicity

Patrick R. Michaud pmichaud
Fri Feb 13 09:21:57 CST 2004


On Thu, Feb 12, 2004 at 08:32:17PM -0800, Greg Morgan wrote:
> I don't think there are too many directories... Probably not enough actually
> Perhaps the scripts directory could be renamed to modules and then have two
> subdirectories under it, core and local.

What's the difference between a "module" and a "script"?

> /modules/local - For custom/cookbook extensions. Note: Should not contain
> local.php or per-group/page customizations. 
> /config

How does one decide if something in the cookbook belongs in /modules/local
or in /config?  Some things in the cookbook are simple configuration 
lines that really don't deserve to be called "modules".

> /images - no change

There is no /images directory, nor do I expect there to be.  The directory
for making things available to browsers is /pub, and if we want an
images directory then it should be /pub/images.

It's very important to keep security in mind when dealing with
directories.  Some admins install PmWiki as part of their html document
tree, while others install it outside the html document tree and provide
links or scripts to map the directories.

For those sites where PmWiki is installed as part of a html document tree,
it's very important that all module scripts and data files be forbidden to
browsers, otherwise they may be exploited by malicious users.  So, every
directory containing a script should contain something (e.g., .htaccess)
to prevent browsers from accessing the script directly.  If we create more
such directories, we have to deal with more .htaccess files.

For those sites where PmWiki is installed outside of the html document 
tree, the admin has to somehow make PmWiki's "public" directories 
available to browsers, either via symlinks, aliases, or configuring 
PmWiki's scripts to look in a different place.  In 0.6, the public
directories are "pub/" and "uploads/".  Creating more public directories
makes more work for those who are installing outside of the html
document tree.

> One thing I was thinking of was maybe having subdirectories in config for
> global config files (local.php) and per group/page config files.
> /config/global/
> /config/global/local.php (or config.php.. Whatever)
> /config/<<groupname>>/
> /config/<<groupname>>/local.php (or config.php.. Whatever)
> /config/<<groupname>>/<<pagename>>/local.php (or config.php.. Whatever)

E_TOOMANYDIRECTORIES.  I like being able to simply create "local/Group.php"
and not having to do "mkdir local/Group; vi local/Group/local.php".

But, for those who really want the separate directories, it's really easy
to write a custom version of scripts/pgcust.php that lets you put the
configuration files in any directory structure you wish.

Pm



More information about the pmwiki-users mailing list