Sharing iCal Calendars
August 25th, 2010From the day our household obtained more than one Macintosh computer, the problem of sharing calendars between multiple macs and multiple users of the macs have plagued me. How do I make my calendar visible to my wife? How can I see her calendar? iCal has always had the ability to publish calendars on the net, and so that’s what we’ve done. At first we published to my work’s WebDAV server. Then when that went away we found the site, www.icalx.com. Users can publish and exchange calendars via the site. We used that for several years. However, I was uncomfortable with the idea of storing my schedule on a public server on the internet. I wanted to setup my own calendar server.
A bit of googling led me to this site: Sebastian Mogilowskis Blog with step by step instructions on how to set it up.
The above link allows one to setup a single directory where all calendars will be stored. I wanted each user to have their own directory, and also have a public and private calendar areas. The solution is simple.
In the apache configuration add the following directive to the VirtualHost section for the calendar web server
<directory /path/to/calendar/dir/*>
AllowOverride AuthConfig Limit
</directory>
Then instead of inserting the “Auth*” directives in the <location> block of the web server config file for the calendar server, you can put it in the .htaccess file found in each user’s calendar directory. For example my calendar directory is: /path/to/calendar/dir/edsel
I would place a .htaccess file in there with the following contents:
AuthName "Calendar"
AuthType Basic
AuthUserFile "/path/to/htpasswd/file"
<limit GET PUT>
require valid-user
</limit>
This makes the calendars stored in /path/to/calendar/dir/edsel available to all users in my htpasswd file, effectively making it publicly available to authorized users of my system.
Then I create a /path/to/calendar/dir/edsel/private with the following .htaccess file:
AuthName "Calendar"
AuthType Basic
AuthUserFile "/path/to/htpasswd/file"
<limit GET PUT>
require user edsel
</limit>
That makes the private directory only accessible to the user ‘edsel’ which is me.
Other users can have a similar directory structure and .htaccess configuration. By ensuring that the .htaccess file in the private directory only lists the owner of that directory, we ensure that its contents remain private.
Now I can host my own calendar sharing site.
This solution is fine and dandy until you begin to have the need to modify other users’ calendars. For example, my wife may want to add our date on Wednesday night to my calendar. With this setup it isn’t possible, since iCal only gives you read-only access to calendars you subscribe to over the network.
Maybe I’ll try Apple’s calendar server soon to see if it has that additional capability… Stay tuned.
-- Posted in Geeks Paradise