Appendix A: TWiki File System

Annotated listings of files included in the 01-Sep-2001 TWiki distribution

Overview

This Appendix contains directory and file listings, and 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 files (e.g. images) and FileAttachments and their 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)
edit Script to edit a topic
geturl Script to fetch URL data
installpasswd Script to install new password by admin
mailnotify Script called by cron job to notify users of changes
oops Script that shows an OK or oops dialog
passwd Script to reset and change password
preview Script to preview topic after edit
rdiff Script to see differences of topics
register Script to register new users
rename Script to rename/move topics and move attachments
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 a 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.cfg For configuration, used by TWiki.pm
TWiki.pm Main TWiki library
TWiki/Access.pm Access control
TWiki/Attach.pm Attachment handling
TWiki/Form.pm Form handling
TWiki/Func.pm Public functions that Plugins may use
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
twikilogo88x31 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
Know/IncorrectDllVersionW32PTH10DLL/W32PTH10.DLL DLL 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, a Trash web, 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/.mailnotify Web-level timstamp of last e-mail notification
_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: up
renamebase.tmpl Used by other rename templates
searchrenameview.tmpl Used by rename to list references to topic being renamed
view.print.tmpl Topic view without header/footer
search.tmpl Search screen
searchmeta.tmpl Search screen
searchbookview.tmpl Search results with full topic content
renamerefs.tmpl Rename done, but some references not changed (topics were locked)
register.tmpl Registration page
registernotify.tmpl Registration notification
view.plain.tmpl Printable topic view with reduced header/footer
preview.tmpl Preview Changes screen
oopsmore.tmpl More topic actions message
view.tmpl Main topic view
edit.tmpl Main edit window
oopsaccesschange.tmpl Error message
oopsaccessgroup.tmpl Error message
oopsaccessrename.tmpl Error message
oopsaccessview.tmpl Error message
oopsauth.tmpl Error message
oopsbadpwformat.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
mailnotify.tmpl Email notification
edit.iejs.tmpl Edit window with IE specific JavaScript
rename.tmpl Doing a new topic rename, user chooses web & topic
changes.tmpl Displays WebChanges list of recently changed topics
rdiff.tmpl Displays text changes before & after (Diffs)
attachagain.tmpl Control screen
attachnew.tmpl Control screen
changeform.tmpl Control screen
moveattachment.tmpl Control screen
renameconfirm.tmpl Confirms a pre-specified rename, ex: undoing a rename
twiki.tmpl Base template definitions used by other templates
attach.tmpl Attach file control screen

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 Sep 14 22:45 .
drwxrwxr-x    5 twiki twiki    4096 Aug  3 01:57 ..
-rw-rw-r--    1 twiki twiki     895 Aug 25 01:32 .htaccess
-rw-rw-r--    1 twiki twiki     782 Aug 25 01:32 .htaccess.txt
-rw-rwxr-x    1 twiki twiki    4819 Sep  7 01:44 attach
-rwxrwxr-x    1 twiki twiki    3381 Jul 21 18:41 changes
-rw-rwxr-x    1 twiki twiki    8056 Sep  3 22:44 edit
-rwxrwxr-x    1 twiki twiki    1736 Nov 17  2000 geturl
-rwxrwxr-x    1 twiki twiki    4481 Aug 21 19:10 installpasswd
-rwxrwxr-x    1 twiki twiki    5829 Aug 21 22:03 mailnotify
-rwxrwxr-x    1 twiki twiki    4512 Aug 25 22:10 makedistrib
-rw-rwxr-x    1 twiki twiki    2254 Aug 21 19:25 oops
-rwxrwxr-x    1 twiki twiki    6399 Aug 22 18:31 passwd
-rw-rwxr-x    1 twiki twiki    5315 Sep  3 22:45 preview
-rwxrwxr-x    1 twiki twiki    8946 Sep  8 18:35 rdiff
-rw-rwxr-x    1 twiki twiki    9199 Aug 25 21:02 register
-rwxrwxr-x    1 twiki twiki   13481 Sep  7 21:17 rename
-rw-rwxr-x    1 twiki twiki    4645 Sep  7 01:44 save
-rwxrwxr-x    1 twiki twiki    4166 Jul 21 18:45 search
-rw-rwxr-x    1 twiki twiki   10006 Sep  7 01:42 statistics
-rwxrwxr-x    1 twiki twiki    9356 Aug 31 10:04 testenv
-rw-rwxr-x    1 twiki twiki   13782 Aug 21 22:17 upload
-rwxrwxr-x    1 twiki twiki   10164 Sep  8 18:24 view
-rw-rwxr-x    1 twiki twiki    2773 Sep 13 17:21 viewfile

Directory twiki/templates/:

drwxrwxr-x    2 twiki twiki    4096 Sep  8 00:47 .
drwxrwxr-x    4 twiki twiki    4096 Sep 10 23:21 ..
-rw-rw-r--    1 twiki twiki    2573 Aug 31 13:06 attach.tmpl
-rw-rw-r--    1 twiki twiki    1604 Aug  3 14:52 attachagain.tmpl
-rw-rw-r--    1 twiki twiki     449 Aug  3 14:47 attachnew.tmpl
-rw-rw-r--    1 twiki twiki    1309 Sep  3 22:47 changeform.tmpl
-rw-rw-r--    1 twiki twiki    1619 Aug 31 13:16 changes.tmpl
-rw-rw-r--    1 twiki twiki   11842 Sep 10 19:00 edit.iejs.tmpl
-rw-rw-r--    1 twiki twiki    2603 Sep  3 22:48 edit.tmpl
-rw-rw-r--    1 twiki twiki     981 May 28 20:14 mailnotify.tmpl
-rw-rw-r--    1 twiki twiki    1499 Aug 31 13:16 moveattachment.tmpl
-rw-rw-r--    1 twiki twiki     570 Aug  1 01:24 oopsaccesschange.tmpl
-rw-rw-r--    1 twiki twiki     586 Aug  1 01:24 oopsaccessgroup.tmpl
-rw-rw-r--    1 twiki twiki     573 Aug  1 01:47 oopsaccessrename.tmpl
-rw-rw-r--    1 twiki twiki     573 Aug  1 01:24 oopsaccessview.tmpl
-rw-rw-r--    1 twiki twiki    1014 Aug  1 01:25 oopsauth.tmpl
-rw-rw-r--    1 twiki twiki     405 Aug  1 01:49 oopsbadpwformat.tmpl
-rw-rw-r--    1 twiki twiki     344 Jul 31 10:16 oopschangepasswd.tmpl
-rw-rw-r--    1 twiki twiki     624 Jul 31 02:09 oopsempty.tmpl
-rw-rw-r--    1 twiki twiki     918 Jul 31 02:20 oopslocked.tmpl
-rw-rw-r--    1 twiki twiki     590 Jul 31 10:25 oopslockedrename.tmpl
-rw-rw-r--    1 twiki twiki     328 Jul 31 10:26 oopsmissing.tmpl
-rw-rw-r--    1 twiki twiki    2158 Sep 13 02:03 oopsmore.tmpl
-rw-rw-r--    1 twiki twiki     407 Aug  1 10:22 oopsmoveerr.tmpl
-rw-rw-r--    1 twiki twiki    1136 Aug  1 01:30 oopsnoformdef.tmpl
-rw-rw-r--    1 twiki twiki     522 Aug  1 01:31 oopsnotwikiuser.tmpl
-rw-rw-r--    1 twiki twiki     413 Jul 31 02:07 oopsnoweb.tmpl
-rw-rw-r--    1 twiki twiki     393 Aug  1 01:32 oopspreview.tmpl
-rw-rw-r--    1 twiki twiki     462 Aug  1 01:32 oopsregexist.tmpl
-rw-rw-r--    1 twiki twiki     345 Aug  1 00:52 oopsregpasswd.tmpl
-rw-rw-r--    1 twiki twiki     356 Aug  1 00:53 oopsregrequ.tmpl
-rw-rw-r--    1 twiki twiki     540 Aug  1 01:57 oopsregthanks.tmpl
-rw-rw-r--    1 twiki twiki     679 Aug  1 01:02 oopsregwiki.tmpl
-rw-rw-r--    1 twiki twiki     411 Aug  1 10:23 oopsrenameerr.tmpl
-rw-rw-r--    1 twiki twiki     483 Aug  1 01:59 oopsresetpasswd.tmpl
-rw-rw-r--    1 twiki twiki     921 Sep  7 23:47 oopsrev.tmpl
-rw-rw-r--    1 twiki twiki     774 Aug  1 01:35 oopssave.tmpl
-rw-rw-r--    1 twiki twiki     477 Aug  1 02:01 oopssaveerr.tmpl
-rw-rw-r--    1 twiki twiki     452 Aug  1 01:37 oopssendmailerr.tmpl
-rw-rw-r--    1 twiki twiki     379 Aug  1 10:23 oopstopicexists.tmpl
-rw-rw-r--    1 twiki twiki     342 Jul 31 10:09 oopsupload.tmpl
-rw-rw-r--    1 twiki twiki     364 Aug  1 02:05 oopswrongpassword.tmpl
-rw-rw-r--    1 twiki twiki    2584 Sep  3 22:49 preview.tmpl
-rw-rw-r--    1 twiki twiki    1539 Sep  8 18:29 rdiff.tmpl
-rw-rw-r--    1 twiki twiki     552 Jul 14 19:23 register.tmpl
-rw-rw-r--    1 twiki twiki    1151 Aug 23 16:38 registernotify.tmpl
-rw-rw-r--    1 twiki twiki     789 Aug  8 23:32 rename.tmpl
-rw-rw-r--    1 twiki twiki    2310 Sep 10 14:56 renamebase.tmpl
-rw-rw-r--    1 twiki twiki     475 Aug  3 16:53 renameconfirm.tmpl
-rw-rw-r--    1 twiki twiki     589 Aug  8 23:32 renamerefs.tmpl
-rw-rw-r--    1 twiki twiki    1792 Aug 31 18:38 search.tmpl
-rw-rw-r--    1 twiki twiki    1650 Aug 31 18:38 searchbookview.tmpl
-rw-rw-r--    1 twiki twiki     149 Sep 13 02:00 searchmeta.tmpl
-rw-rw-r--    1 twiki twiki    2044 Aug 31 18:38 searchrenameview.tmpl
-rw-rw-r--    1 twiki twiki    2246 Aug 31 13:08 twiki.tmpl
-rw-rw-r--    1 twiki twiki     418 Aug 31 13:07 view.plain.tmpl
-rw-rw-r--    1 twiki twiki     826 Aug 31 13:08 view.print.tmpl
-rw-rw-r--    1 twiki twiki    1770 Sep  8 00:32 view.tmpl

Directory twiki/data/:

drwxrwxr-x    8 nobody nobody  4096 Sep  7 01:04 .
drwxrwxr-x    4 nobody nobody  4096 Sep 10 23:21 ..
-rw-rw-rw-    1 twiki  twiki    159 Aug 24 19:49 .htpasswd
drwxrwxr-x    2 nobody nobody  4096 Sep  9 02:45 Know
drwxrwxr-x    2 nobody nobody  4096 Sep  9 02:45 Main
drwxrwxr-x    2 nobody nobody  8192 Sep 14 23:22 TWiki
drwxrwxr-x    2 nobody nobody  4096 Sep  9 02:45 Test
drwxrwxr-x    2 nobody nobody  4096 Sep 14 12:04 Trash
drwxrwxr-x    2 nobody nobody  4096 Sep  9 02:45 _default
-rw-rw-rw--   1 twiki  twiki      0 Jul  1 02:20 debug.txt
-rw-rw-r--    1 twiki  twiki    3419 Aug 13 00:15 mime.types
-rw-rw-rw--   1 twiki  twiki      0 Jul  1 02:19 warning.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   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   3501 Sep 14 11:57 twikilogo88x31.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? - 14 Sep 2001
-- PeterThoeny? - 14 Sep 2001