[CalendarServer-dev] Correct location for .xml and .sqlite files

Andre LaBranche dre at apple.com
Thu Jun 7 11:38:51 PDT 2012


On Jun 7, 2012, at 9:40 AM, Rahul Amaram <amaramrahul at users.sourceforge.net> wrote:

> Ok. Where are accounts.xml and servertoserver.xml stored?

For the server to function properly, it doesn't matter where they are stored, as long as the caldavd.plist has the correct path to these (and any other) additional resources. Accounts.xml is commonly used, but servertoserver.xml is related to an unsupported server feature. ConfigRoot would be a suitable place for both of these.

> The more relevant point for me is who maintains these files. For ex, accounts.xml, sudoers.plist and caldavd.plist are managed by the administrator.

Correct. Also I think sudoers is gone now - it tends to cause enough problems that it's safer to just not use it. Scheduling is complicated, and it's critical that organizers are really who they appear to be, not somebody masquerading as somebody else via sudoers.

> So they are treated as config files and stored in /etc/caldavd/. What about all the other files?

Like what? Things that aren't config files probably shouldn't be edited unless you know what you are doing. Even if you think you know what you're doing, you should be sure there is no way of mutating data via protocol or one of our supported cli tools before you edit any data directly (e.g. by executing raw sql against the caldav DB or proxy DB)

> Are they edited by the administrator (in which case their directory should be ConfigRoot) or are they modified by the caldavd daemon (in which case directory should be DataRoot)?

There's a pretty nice way to decide, but I don't think you have to decide for each file. If you set ConfigRoot and DataRoot, pretty much everything else should be relative to those if you don't use absolute paths in caldavd.plist.

-dre

> 
> On Thursday 07 June 2012 09:22 PM, Morgen Sagen wrote:
>> On Jun 7, 2012, at 7:38 AM, Rahul Amaram<amaramrahul at users.sourceforge.net>  wrote:
>> 
>>> Hi,
>>> I am almost done with packaging calendarserver 3.2 for Debain. I am slightly confused with the location of various files though.
>>> 
>>> I am assuming that for all .xml files (including augments.xml, proxies.xml and resources.xml), ConfigRoot is the appropriate directory for them. Am I right? Also where should augments.sqlite and proxies.sqlite supposedly be stored? I think even these should be stored in $ConfigRoot.
>> On an OS X Server, our directory layout is:
>> 
>> /Library/Server/Calendar and Contacts/    [aka ServerRoot]
>> 	Config/	[aka ConfigRoot]
>> 		caldavd.plist
>> 	Data/   	[aka DataRoot]
>> 		Attachments/		[aka AttachmentsRoot]
>> 		Documents/		[aka DocumentRoot]
>> 			.calendarserver_version
>> 		augments.xml
>> 		mailgatewaytokens.sqlite
>> 		memberships_cache
>> 		proxies.sqlite
>> 		resources.xml
> 
> -- 
> http://rahul.amaram.name
> 
> _______________________________________________
> calendarserver-dev mailing list
> calendarserver-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/calendarserver-dev



More information about the calendarserver-dev mailing list