A: TWiki File System

Breakdown of the files included in the 01-Sep-2001 TWiki distribution

Overview

This Appendix contains directory and file listings, with individual file descriptions, for the full 01-Sep-2001 TWiki distribution package.

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 subdirectory structure intact:

Directory: Files: Used for:
twiki list Start-up info
twiki/bin list Perl scripts
twiki/lib list Configuration file, main library, Perl system modules, Plugins
twiki/pub list Public support files (ex: FileAttachments, images) and RCS histories)
twiki/data list Topic text (page content) and RCS histories;
twiki/templates list HTML templates, used by TWiki scripts

File Descriptions

A rundown of the individual files included in the current 01-Sep-2001 distribution, organized by TWiki root directories.

Files in twiki

Application info and the current reference documentation. Full file list:

File: Used for:
index.html A page with a link to first launch TWiki after install
license.txt GNU General Public License and TWiki-specific info
readme.txt General TWiki start-up info with relevant URLs
TWikiDocumentation.html All documentation packaged as a single page
TWikiHistory.html TWiki development timeline

Files in twiki/bin

Perl CGI scripts. Full file list:

File: Used for:
.htaccess.txt Authentication. Rename to .htaccess and customize if used
attach Script that shows the attach file page (FileAttachment)
delete (not used yet)
edit Script to edit a topic
geturl Script to fetch URL data
mailnotify Script called by cron job to notify users of changes
oops Script that shows an OK or oops dialog
preview Script to preview topic after edit
rdiff Script to see differences of topics
rename Script to rename/move topics and move attachments
register Script to register new users
save Script that saves a topic, called by preview
search Script that displays search results
statistics Script to create statistics topic
testenv Script to test CGI environment variables
upload Script that does file upload (FileAttachment)
view Script to view a topic ( the script )
viewfile Script to view an file attachment

Files under twiki/lib

The new lib/TWiki/Plugins directories contain configuration, library and function files, and TWikiPlugins. Full file list:

File: Used for:
TWiki.pm Main TWiki library
TWiki.cfg For configuration, used by TWiki.pm
TWiki/Access.pm Access control
TWiki/Attach.pm Attachment handling
TWiki/Form.pm Form handling
TWiki/Meta.pm Meta data in topics
TWiki/Net.pm SMTP mail handling
TWiki/Plugins.pm Plugin handling
TWiki/Prefs.pm Preferences handling
TWiki/Search.pm Search engine, used by wiki.pm
TWiki/Store.pm Back-end storage, *.txt text file and *.txt,v RCS repository file handling
TWiki/Plugins/DefaultPlugin.pm Handles some legacy rules
TWiki/Plugins/EmptyPlugin.pm Empty plugin, use to create your own
TWiki/Plugins/InterwikiPlugin.pm Use aliases as links for predefined URLs

Files under twiki/pub

The pub directory stores data-related files, including images used by TWiki and FileAttachments. Attachments are stored in sub-directories created with the related topic name. Partial file list:

File: Used for:
favicon.ico ICO file
twikilogo.gif GIF file
twikilogo1.gif GIF file
twikilogo2.gif GIF file
twikilogo3.gif GIF file
twikilogo4.gif GIF file
wikiHome.gif GIF file
icn/_filetypes.txt GIF file
icn/bat.gif GIF file
icn/bmp.gif GIF file
... ...
TWiki/FileAttachment/Sample.txt TEXT file
TWiki/FileAttachment/Smile.gif GIF file
TWiki/PreviewBackground/blankltgraybg.gif GIF file
TWiki/PreviewBackground/blankwhitebg.gif GIF file
TWiki/PreviewBackground/previewbg.gif GIF file
TWiki/WabiSabi/wabisabi.gif GIF file

Files under twiki/data

TWiki page data stored as individual text files. Each active web has its own subdirectory. The TWiki distribution includes four start-up webs - Main, TWiki, Know, Test - with documentation and demo content, and a _default directory containing all topics required to start a new web. Partial file list:

File: Used for:
.htpasswd Basic Authentication (htaccess) password file
debug.txt Program messages useful for debugging
mime.types Recognized file formats
warning.txt Diagnostic messages for identifying problems
_default directory can be copied to empty directory when creating new Webs
_default/.changes Web-level record of topic changes
_default/WebChanges.txt Display most recent topic changes in web
_default/WebChanges.txt,v Revisions history (RCS)
_default/WebHome.txt Default web home page
_default/WebHome.txt,v Revisions history (RCS)
_default/WebIndex.txt Lists all topics in a web
_default/WebIndex.txt,v Revisions history (RCS)
_default/WebNotify.txt Subscribe/unsubscribe to web changes email alert
_default/WebNotify.txt,v Revisions history (RCS)
_default/WebPreferences.txt Web-level preference settings
_default/WebPreferences.txt,v Revisions history (RCS)
_default/WebSearch.txt Web-level search options
_default/WebSearch.txt,v Revisions history (RCS)
_default/WebStatistics.txt Generates web usage statistics
_default/WebStatistics.txt,v Revisions history (RCS)
... ...

Files in twiki/templates

Templates used to control appearance of all rendered pages. Full file list:

File: Used for:
oopsbadpwformat.tmpl Error message
attachagain.tmpl Control screen
attachnew.tmpl Control screen
changeform.tmpl Control screen
changes.tmpl Displays WebChanges list of recently changed topics
edit.iejs.tmpl xxxx
edit.tmpl Main edit window
mailnotify.tmpl xxxx
moveattachment.tmpl Control screen
oopsaccesschange.tmpl Error message
oopsaccessgroup.tmpl Error message
oopsaccessrename.tmpl Error message
oopsaccessview.tmpl Error message
oopsauth.tmpl Error message
attach.tmpl Error message
oopschangepasswd.tmpl Error message
oopsempty.tmpl Error message
oopslocked.tmpl Error message
oopslockedrename.tmpl Error message
oopsmissing.tmpl Error message
oopsmoveerr.tmpl Error message
oopsnoformdef.tmpl Error message
oopsnotwikiuser.tmpl Error message
oopsnoweb.tmpl Error message
oopspreview.tmpl Error message
oopsregexist.tmpl Error message
oopsregpasswd.tmpl Error message
oopsregrequ.tmpl Error message
oopsregthanks.tmpl Error message
oopsregwiki.tmpl Error message
oopsrenameerr.tmpl Error message
oopsresetpasswd.tmpl Error message
oopsrev.tmpl Error message
oopssave.tmpl Error message
oopssaveerr.tmpl Error message
oopssendmailerr.tmpl Error message
oopstopicexists.tmpl Error message
oopsupload.tmpl Error message
oopswrongpassword.tmpl Error message
preview.tmpl Preview Changes screen
rdiff.tmpl Displays text changes before & after (Diffs)
register.tmpl Registration page
registernotify.tmpl xxxx
rename.tmpl Doing a new topic rename, user chooses web & topic
renamebase.tmpl Used by other rename templates
renameconfirm.tmpl Confirms a pre-specified rename, ex: undoing a rename
renamerefs.tmpl Rename done, but some references not changed (topics were locked)
search.tmpl xxxx
searchbookview.tmpl Search results with full topic content
searchmeta.tmpl xxxx
searchrenameview.tmpl Used by rename to list references to topic being renamed
twiki.tmpl Base template definitions used by other templates
view.plain.tmpl Alternate topic header/footer view
view.print.tmpl Alternate topic header/footer view
view.tmpl Main topic view

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.

Directory twiki/bin :

drwxrwxr-x   2 twiki twiki   4096 Jun 17 16:34 .
drwxrwxr-x   3 twiki twiki   4096 Jun 17 16:34 ..
-rw-rw-r--   1 twiki twiki    650 Feb 10  2000 .htaccess
-rwxrwxr-x   1 twiki twiki   4322 Mar 12 00:31 attach
-rwxrwxr-x   1 twiki twiki   1426 Jun 20 19:52 delete
-rwxrwxr-x   1 twiki twiki   9001 Jul 28 11:03 edit
-rwxrwxr-x   1 twiki twiki   1811 Mar 11 02:27 geturl
-rwxrwxr-x   1 twiki twiki   5006 Mar 11 02:41 mailnotify
-rwxrwxr-x   1 twiki twiki   1769 Mar 11 03:07 oops
-rwxrwxr-x   1 twiki twiki   6890 Jun 21 19:58 preview
-rwxrwxr-x   1 twiki twiki   7606 Mar 31 18:30 rdiff
-rwxrwxr-x   1 twiki twiki   8349 Jun 21 18:12 register
-rwxrwxr-x   1 twiki twiki   2693 Jul  5 14:32 save
-rwxrwxr-x   1 twiki twiki   3831 Jul 20 12:13 search
-rwxrwxr-x   1 twiki twiki   9835 Jun 20 19:03 statistics
-rwxrwxr-x   1 twiki twiki    509 Feb  7  2000 testenv
-rwxrwxr-x   1 twiki twiki  14543 Jul 20 18:46 upload
-rwxrwxr-x   1 twiki twiki   4755 May 22 18:11 view
-rwxrwxr-x   1 twiki twiki   1689 Jun 20 20:10 viewfile

Directory twiki/templates/ :

drwxrwxr-x   4 twiki twiki   4096 Aug  3 01:17 .
drwxrwxr-x   4 twiki twiki   4096 Aug 19 18:38 ..
drwxrwxr-x   2 twiki twiki   4096 Jun 17 16:35 Know
drwxrwxr-x   2 twiki twiki   4096 May  1 01:24 Main
-rw-rw-r--   1 twiki twiki   2688 Aug 15 18:15 attach.tmpl
-rw-rw-r--   1 twiki twiki   1283 Jul 20 15:56 attachtable.tmpl
-rw-rw-r--   1 twiki twiki   1907 Jul 28 16:41 changes.tmpl
-rw-rw-r--   1 twiki twiki   2265 Aug 15 17:57 edit.tmpl
-rw-rw-r--   1 twiki twiki    965 Feb  8  2000 mailnotify.tmpl
-rw-rw-r--   1 twiki twiki     30 Jan 13  1999 notedited.tmpl
-rw-rw-r--   1 twiki twiki    940 Jul 20 15:59 notext.tmpl
-rw-rw-r--   1 twiki twiki    907 Jul 20 16:01 notwiki.tmpl
-rw-rw-r--   1 twiki twiki    341 Mar  8 11:39 noweb.tmpl
-rw-rw-r--   1 twiki twiki   1000 Mar  8 11:40 oops.tmpl
-rw-rw-r--   1 twiki twiki   1043 Oct 23 19:17 oopsaccesschange.tmpl
-rw-rw-r--   1 twiki twiki   1036 Oct 23 19:17 oopsaccessview.tmpl
-rw-rw-r--   1 twiki twiki    914 Mar  8 11:40 oopsdel.tmpl
-rw-rw-r--   1 twiki twiki   1423 May 29 01:23 oopslocked.tmpl
-rw-rw-r--   1 twiki twiki   1067 Mar  8 11:41 oopsregexist.tmpl
-rw-rw-r--   1 twiki twiki    955 Mar  8 11:41 oopsregpasswd.tmpl

Directory twiki/data/ :

drwxrwxrwx   6 nobody  nobody  4096 Aug  3 01:09 .
drwxrwxr-x   4 twiki   twiki   4096 Aug 19 18:38 ..
-rw-rw-r--   1 nobody  nobody    51 Apr 21 16:48 .htpasswd
drwxrwxrwx   2 nobody  nobody  4096 Aug 20 17:18 Know
drwxrwxrwx   2 nobody  nobody  4096 Aug 19 04:15 Main
drwxrwxrwx   2 nobody  nobody  4096 Aug 20 17:56 TWiki
-rw-rw-rw-   1 twiki   twiki      1 Mar 11 04:19 debug.txt
-rw-r--r--   1 nobody  nobody  1516 Aug 20 17:56 log200008.txt

Partial file list for twiki/data/Main :

drwxrwxrwx   2 nobody  nobody  4096 Aug 19 04:15 .
drwxrwxrwx   6 nobody  nobody  4096 Aug  3 01:09 ..
-rw-rw-rw-   1 twiki twiki     3716 Aug 19 02:19 .changes
-rw-rw-rw-   1 twiki twiki        9 Aug 19 02:45 .mailnotify
-rw-r--r--   1 nobody  nobody   358 Aug 18 17:22 OfficeLocations.txt
-r--r--r--   1 nobody  nobody   878 Aug 18 17:22 OfficeLocations.txt,v
-rw-r--r--   1 nobody  nobody   680 Aug 18 17:36 TWikiGuest.txt
-r--r--r--   1 nobody  nobody  1989 Aug 18 17:36 TWikiGuest.txt,v
-rw-r--r--   1 nobody  nobody   459 Aug 18 17:19 TWikiUsers.txt
-r--r--r--   1 nobody  nobody  3840 Aug 18 17:19 TWikiUsers.txt,v
-rw-r--r--   1 nobody  nobody    95 Aug 19 03:06 WebChanges.txt
-r--r--r--   1 nobody  nobody   284 Aug 19 03:06 WebChanges.txt,v
-rw-r--r--   1 nobody  nobody  1853 Aug 18 18:08 WebHome.txt
-r--r--r--   1 nobody  nobody  6523 Aug 18 18:08 WebHome.txt,v

Directory twiki/pub/ :

drwxrwxrwx   6 nobody  nobody  4096 Aug  3 01:21 .
drwxrwxr-x   3 twiki   twiki   4096 Jun 17 16:35 ..
drwxrwxrwx   3 nobody  nobody  4096 Jun 17 16:35 Know
drwxrwxrwx   2 nobody  nobody  4096 Aug  3 01:21 Main
drwxrwxrwx   3 nobody  nobody  4096 Aug  3 01:21 TWiki
-rw-rw-r--   1 twiki   twiki   1078 Jan 14  2000 favicon.ico
drwxrwxr-x   2 twiki   twiki   4096 Jun 17 16:35 icn
-rw-rw-r--   1 twiki   twiki   3016 Oct  5  1999 twikilogo.gif
-rw-rw-r--   1 twiki   twiki   5320 Oct  5  1999 twikilogo1.gif
-rw-rw-r--   1 twiki   twiki   6125 Oct  5  1999 twikilogo2.gif
-rw-rw-r--   1 twiki   twiki   7218 Oct  5  1999 twikilogo3.gif
-rw-rw-r--   1 twiki   twiki   6710 Oct  5  1999 twikilogo4.gif
-rw-rw-r--   1 twiki   twiki   2877 Jun  7  1999 wikiHome.gif

Partial file list for twiki/pub/icn/ :

drwxrwxr-x   2 twiki   twiki   4096 Jun 17 16:35 .
drwxrwxrwx   6 nobody  nobody  4096 Aug  3 01:21 ..
-rw-rw-r--   1 twiki   twiki    801 Mar 26  1999 _filetypes.txt
-rw-rw-r--   1 twiki   twiki    143 Mar  9  1999 bat.gif
-rw-rw-r--   1 twiki   twiki    926 Mar  9  1999 bmp.gif
-rw-rw-r--   1 twiki   twiki    141 Mar 25  1999 c.gif
-rw-rw-r--   1 twiki   twiki    144 Mar  9  1999 dll.gif
-rw-rw-r--   1 twiki   twiki    152 Mar  9  1999 doc.gif

-- MikeMannix? - 08 Sep 2001