Tips and Tricks

The moin command line program is installed at /afs/ (which is in the default path for bash users). It is quite useful for managing your wiki; see HelpOnMoinCommand for its documentation. You will need to provide at least --config-dir and --wiki-url as arguments (represented by ... in our examples).

Managing Inactive Users

You may find yourself with a large number of inactive users; a likely cause is registration spam if you have a wiki relying on a trusted editors group instead of TextCHA. Moin handily provides a command to list and remove inactive users.

The process of removing inactive users occurs in two steps. First you gather the list of active and inactive users in a file (substitute $KEEP with a name of your choosing)

moin ... acount inactive --py-append=$KEEP

$FILE will contain the set of users that are to be kept. If you see any bogus accounts in the file, remove the line containing them. Next, using the file of users to keep, review which members would be deleted were you to proceed:

Make a backup of your wiki before continuing (or at least the data/user directory). If you forget the --show argument you will initiate an irrevocable change.

If you do screw your wiki up, MemberManual/Backups might help you recover, but don't rely on it!

moin ... account inactive --py-exec=$KEEP --show

This will result in output like:

1239843008.83.54402     u'FooBar'    u'email@domain.tld'        0

You probably want to redirect this to a file to analyze in a text editor since there will likely be at least a few users you do not want to prune. When you encounter a user you do not want to delete, note the uid (the first field in a line, e.g. 1239843008.83.54402 in the example above). You will need to add a new line to $KEEP in the format:


If you copy all of the lines from the list you want to keep into a new file, you can pipe it through cut -f1 to extract the UID.

FIXME: Trivial script to take list of lines from $KEEP and generate editlog commands to keep additional users

FIXME: document actually removing inactive users

Removing stale editor backups

This recipe has not been tested with Moin after 1.7.x, proceed at your own risk. If you know a better way or that it does still work, update the page!

If you want to remove the "MoinEditorBackup" files from your wiki instance, then do the following.

for i in $(find $DATA/pages -type d \
  -name '*(2f)MoinEditorBackup'); do
    rm -fr $i

Unlock locked files

This recipe has not been tested with Moin after 1.7.x, proceed at your own risk. If you know a better way or that it does still work, update the page!

If your wiki instance still isn't working, then you might have a stale lock file or two. Do the following to remove stale lockfiles.

for i in $(find $DATA/pages -type f -name current-locked); do
    echo "Removing stale lockfile in $(dirname $i) ..."
    mv $i $(dirname $i)/current

500 Server Error

If you get a 500 server error when running your wiki, one likely cause is permissions on your $INSTANCE directory. The directory which contains moin.cgi needs to have permissions 755, because suexec will refuse to run the cgi if its parent directory is writeable by others. Note that the directory permissions do not actually affect anything (since we're using AndrewFileSystem), but modifying the suexec code to skip the checks is considered too risky.

Installing Themes

You can install most plugins with no problem, but themes at least require that you place files into the shared htdocs. You have two options:

  1. Request that we install the static files site-wide (no problem for things in the theme market)
  2. Copy the static files into your own directory, and change HtDocs (this requires that you keep up to date with upgrades)

We are serving the css and images for at least the following themes: