n8blog
distraction in action

Mac OS X Hints recently had a useful hint about adding a preview pane to Blosxom writebacks. (Yes, I'll
be implementing that at some point… ;^) In the discussion that followed,
some people posted some comments about setting up Blosxom on OS X that struck
me as a bit misinformed. In particular, people didn't seem to know what files
needed to be readable by the web server user (user: www,
group: www) and what files needed to be writable
(usually owned) by that user. Also, people seemed to be under the impression
that they should put the raw .txt files inside their website's
directory hierarchy, which is probably not wise.

Here's the breakdown. These files just need to be readable by www:www:

  • Blog entries (usually .txt files)
  • Flavour files
  • Plugins

Therefore, these files can live anywhere as long as the www user has read access. I put them in
/Users/n8gray/web/blosxom, which I made readable by all users.

There's usually only one directory that needs to be writable by the web server: The plugin state directory. You want to make sure, however, that only
you and www are able to write there. One easy way to do this is
to make the plugin state directory owned by you, but with group www. Then make
it both owner and group writable (Permissions 775, or drwxrwxr-x). I use the
directory /Users/n8gray/web/blosxom/plugins/state for plugins.

One thing to note is that none of these files are under /Users/n8gray/Sites or /Library/WebServer. Putting
them in those directories would potentially allow strangers to read raw files
or activate plugins directly from their browsers, which is probably
undesirable. We want all access to the blog content to be through the
blosxom.cgi script. Therefore, blosxom.cgi should be
the only part of the Blosxom system that lives in a
publicly-accessible area (something like ~/Sites/cgi-bin).

Finally, I don't claim that this is the best or only way to set up Blosxom under OS X. I do, however, think that this is a sensible way to set it up.
Leave a comment if you have a better idea!

  Comments:

1. Maynard Handley replies:

In particular the problem I have had with permissions is in
wanting to use the wikieditish plugin. This seems like a great
idea, but I cannot get the thing to work. Specifically the edit
page comes up, but when I try to save the edited page I get the
error message “Something didn’t go as expected; page not
saved”. My first thought was permissions, but lots of dicking
around with permissions, culminating in giving rw permission to
all three of user/staff/other for both the file being edited and
the directory in which it lives were not helpful. Neither was the
file open in another editor.

My suspicion is that people having problems with permissions
may be complaining about this wikieditish issue. (And BTW, if
anyone knows why wikieditish isn’t working, please speak up.)