BSD DevCenter
oreilly.comSafari Books Online.Conferences.


Big Scary Daemons

Installing OCSweb on FreeBSD


The OCSweb package allows users to post messages, read and send e-mail, and keep calendars, all via a web browser. It's friendly, easy to enable over https, and fairly robust. Unfortunately, it only runs on Linux. If you're looking for this functionality on BSD, you're pretty much out of luck.

At one point I needed this functionality on my laptop, so that I could access my e-mail from anywhere in the office, even without ssh on desktops. I could have fought with the package to make it run under Linux mode. Instead, one slow Saturday I decided to port OCSweb to FreeBSD.

Let me start off by saying I know almost nothing about code. I write scary Perl to eliminate tedious jobs, and my C makes seasoned programmers shake their heads. We all start somewhere, though.

I started by downloading the entire OCSweb package from The README informed me that to get an e-mail reader on a Web site, I needed to use the ocs-base and ocs-email modules. Fair enough. Hoping I would get very lucky, I tried the install script. It died, complaining about pkg/getversion.

A brief reading of showed that pkg/makefile contained the Make instructions. The pkg/getversion line seemed Linux-specific, with no FreeBSD equivalent, so I just commented it out. Similarly, I changed the $prefix variable from /opt to /usr/local.

The install script got a little further, compiling despite complaints about a deprecated <malloc.h>. Eventually I came to:

chgrp: no such user

Linux has a "root" group, however, which has no exact equivalent in FreeBSD. I went through, replacing the "root" group with "wheel," our closest equivalent. While the script finished, /usr/local/ocs was mostly empty.

Some more hunting through the install script turned up the file pkg/filelist. This file contained the names of the ocsbase files, their destinations, their owners, their groups, and their permissions. It was chock full of root.root entries, saying that the files would be owned by root and in the root group. Emacs fixed that in a couple dozen keystrokes.

Pages: 1, 2, 3

Next Pagearrow

Sponsored by: