Appendix A: TWiki Filesystem

Annotated directory and file listings, for the 01-Sep-2004 TWiki production release.

Who and What is This Good For?

Interested Users and Site Administrators can find out in simple terms what each part of TWiki actually does. Adventurous Adminstrators with server access to files (via telnet, ssh or ftp) can also figure out where to look to make minor modifications, like changing hardcode text or color. Software Developers can get an at-a-glance overview of TWiki code architecture.

Directory Structure

You can rename the root TWiki directory - twiki - to whatever you like by changing it in the TWiki.cfg configuration file. However, to keep the current installation and future upgrades simple, you should leave the five main subdirectories intact:

Files under twiki/pub

The pub directory stores topic-related files, including images used by TWiki and FileAttachments. Attachments are stored in subdirectories created with the related topic name. You can also upload files directly for and link manually (but not through Attach) Partial file list:

Files under twiki/data

TWiki topics: data stored as individual text files and rendered by TWiki for display as regular Web pages. Each active web has its own subdirectory. The TWiki distribution includes a number of start-up webs - Main, TWiki, and Sandbox - with documentation and demo content, a Trash web for browser-based, recoverable topic deletion, and a _default directory containing a core topic set required to start a new web. Partial file list:

Display if rename done, but some references not changed (topics were locked)

search.tmpl

Search screen

searchbookview.tmpl

Search results with full topic content

searchformat.tmpl

Search screen for formatted search

searchmeta.tmpl

Search screen

searchrenameview.tmpl

Used by rename to list references to topic being renamed

twiki.tmpl

Master template: definitions are used by other templates

view.plain.tmpl

Skin for bare bone topic view without header/footer but with HTML head and body tags

view.print.tmpl

Skin for printable topic view with a simple header/footer

view.rss.tmpl

Skin for topic view in RDF XML format

view.text.tmpl

Skin for topic text only, without HTML head and body tags, and no form and attachments

view.tmpl

Main topic view - the standard regular Web page

TWiki File System Snapshot

The following partial directory listings from a Linux installation show typical file permissions and ownership. This is provided for general debugging use only and isn't an exact representation of the current distribution.

On an ISP installation... The user and group - twiki twiki - will probably be your domain or login name, eg: yourdomain yourdomain and can't be changed; same for nobody nobody files further down. Also, in the bin directory, scripts might need a .cgi (sometimes .pl) extension.