Miggl

Q: Calendar Service Permission Problems

I suspect my calendar files are suffering from incorrect permissions and maybe even erroneous ACLs. However, I'm not sure how to fix that. All this started after restoring to a different hard drive from Time Machine (I was doing a hard drive migration after upgrading to a SSD -- 'Server HD' is the SSD drive, and 'Data HD' is a larger, conventional hard drive where the data files are stored).

 

Here are the errors I am getting in the Calendar Error Log from Server App 2.2:

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-] Connection close failed

2012-12-22 11:26:54-0700 [-] [groupcacher]           Traceback (most recent call last):

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threadi ng.py", line 552, in __bootstrap_inner

2012-12-22 11:26:54-0700 [-] [groupcacher]             

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threadi ng.py", line 505, in run

2012-12-22 11:26:54-0700 [-] [groupcacher]             

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/database.py", line 51, in _worker

2012-12-22 11:26:54-0700 [-] [groupcacher]               self._closeConnection()

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/database.py", line 59, in _closeConnection

2012-12-22 11:26:54-0700 [-] [groupcacher]               self.pool._close(conn)

2012-12-22 11:26:54-0700 [-] [groupcacher]           --- <exception caught here> ---

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/enterprise/adbapi.py", line 439, in _close

2012-12-22 11:26:54-0700 [-] [groupcacher]               conn.close()

2012-12-22 11:26:54-0700 [-] [groupcacher]           exceptions.AttributeError: 'NoneType' object has no attribute 'close'

2012-12-22 11:26:54-0700 [-] [groupcacher]

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-] Exception in thread PoolThread-4431952784-1:

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-] Traceback (most recent call last):

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threadi ng.py", line 552, in __bootstrap_inner

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threadi ng.py", line 505, in run

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-]   File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/database.py", line 51, in _worker

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-]     self._closeConnection()

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-]   File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/database.py", line 60, in _closeConnection

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-]     del self.pool.connections[tid]

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-] KeyError: 4440956928

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-]

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-] Unhandled error in Deferred:

2012-12-22 11:26:54-0700 [-] [groupcacher] 2012-12-22 11:26:54-0700 [-] Unhandled Error

2012-12-22 11:26:54-0700 [-] [groupcacher]           Traceback (most recent call last):

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 397, in errback

2012-12-22 11:26:54-0700 [-] [groupcacher]               self._startRunCallbacks(fail)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 464, in _startRunCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               self._runCallbacks()

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 551, in _runCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               current.result = callback(current.result, *args, **kw)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1101, in gotResult

2012-12-22 11:26:54-0700 [-] [groupcacher]               _inlineCallbacks(r, g, deferred)

2012-12-22 11:26:54-0700 [-] [groupcacher]           --- <exception caught here> ---

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = result.throwExceptionIntoGenerator(g)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

2012-12-22 11:26:54-0700 [-] [groupcacher]               return g.throw(self.type, self.value, self.tb)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/directory/directory.py", line 1090, in update

2012-12-22 11:26:54-0700 [-] [groupcacher]               yield self.updateMethod()

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = result.throwExceptionIntoGenerator(g)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

2012-12-22 11:26:54-0700 [-] [groupcacher]               return g.throw(self.type, self.value, self.tb)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/directory/directory.py", line 824, in updateCache

2012-12-22 11:26:54-0700 [-] [groupcacher]               delegatedGUIDs = set((yield self.proxyDB.getAllMembers()))

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = result.throwExceptionIntoGenerator(g)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

2012-12-22 11:26:54-0700 [-] [groupcacher]               return g.throw(self.type, self.value, self.tb)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/directory/calendaruserproxy.py", line 890, in getAllMembers

2012-12-22 11:26:54-0700 [-] [groupcacher]               returnValue([row[0] for row in (yield self.query("select DISTINCT MEMBER from GROUPS"))])

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = result.throwExceptionIntoGenerator(g)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

2012-12-22 11:26:54-0700 [-] [groupcacher]               return g.throw(self.type, self.value, self.tb)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/database.py", line 206, in query

2012-12-22 11:26:54-0700 [-] [groupcacher]               yield self.open()

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = result.throwExceptionIntoGenerator(g)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

2012-12-22 11:26:54-0700 [-] [groupcacher]               return g.throw(self.type, self.value, self.tb)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/directory/calendaruserproxy.py", line 802, in open

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = yield super(ProxyDB, self).open()

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = result.throwExceptionIntoGenerator(g)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

2012-12-22 11:26:54-0700 [-] [groupcacher]               return g.throw(self.type, self.value, self.tb)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/database.py", line 111, in open

2012-12-22 11:26:54-0700 [-] [groupcacher]               test = (yield self._test_schema_table())

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = result.throwExceptionIntoGenerator(g)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

2012-12-22 11:26:54-0700 [-] [groupcacher]               return g.throw(self.type, self.value, self.tb)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/database.py", line 518, in _test_table

2012-12-22 11:26:54-0700 [-] [groupcacher]               """ % (name,)))

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = result.throwExceptionIntoGenerator(g)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

2012-12-22 11:26:54-0700 [-] [groupcacher]               return g.throw(self.type, self.value, self.tb)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/database.py", line 431, in _db_value_for_sql

2012-12-22 11:26:54-0700 [-] [groupcacher]               for row in (yield self._db_values_for_sql(sql, *query_params)):

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = result.throwExceptionIntoGenerator(g)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

2012-12-22 11:26:54-0700 [-] [groupcacher]               return g.throw(self.type, self.value, self.tb)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/database.py", line 416, in _db_values_for_sql

2012-12-22 11:26:54-0700 [-] [groupcacher]               results = (yield self.pool.runQuery(sql, *query_params))

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/threadpool.py", line 207, in _worker

2012-12-22 11:26:54-0700 [-] [groupcacher]               result = context.call(ctx, function, *args, **kwargs)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/context.py", line 118, in callWithContext

2012-12-22 11:26:54-0700 [-] [groupcacher]               return self.currentContext().callWithContext(ctx, func, *args, **kw)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/context.py", line 81, in callWithContext

2012-12-22 11:26:54-0700 [-] [groupcacher]               return func(*args,**kw)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/enterprise/adbapi.py", line 445, in _runInteraction

2012-12-22 11:26:54-0700 [-] [groupcacher]               conn = self.connectionFactory(self)

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/enterprise/adbapi.py", line 38, in __init__

2012-12-22 11:26:54-0700 [-] [groupcacher]               self.reconnect()

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/enterprise/adbapi.py", line 75, in reconnect

2012-12-22 11:26:54-0700 [-] [groupcacher]               self._connection = self._pool.connect()

2012-12-22 11:26:54-0700 [-] [groupcacher]             File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/enterprise/adbapi.py", line 414, in connect

2012-12-22 11:26:54-0700 [-] [groupcacher]               conn = self.dbapi.connect(*self.connargs, **self.connkw)

2012-12-22 11:26:54-0700 [-] [groupcacher]           sqlite3.OperationalError: unable to open database file

2012-12-22 11:26:54-0700 [-] [groupcacher]

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-] Log opened.

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-] twistd 12.0.0 (/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/ Contents/MacOS/Python 2.7.2) starting up.

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-] reactor class: twext.internet.kqreactor.KQueueReactor.

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-] HTTPFactory starting on 62310

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-] set uid/gid 93/93

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-] Traceback (most recent call last):

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/usr/bin/twistd", line 14, in <module>

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     run()

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/scripts/twistd.py", line 27, in run

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     app.run(runApp, ServerOptions)

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/application/app.py", line 652, in run

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     runApp(config)

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/scripts/twistd.py", line 23, in runApp

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     _SomeApplicationRunner(config).run()

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/application/app.py", line 390, in run

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     self.postApplication()

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/scripts/_twistd_unix.py", line 208, in postApplication

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     self.startApplication(self.application)

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/scripts/_twistd_unix.py", line 326, in startApplication

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     app.startApplication(application, not self.config['no_save'])

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/application/app.py", line 674, in startApplication

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     service.IService(application).startService()

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/application/service.py", line 282, in startService

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     service.startService()

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/mail.py", line 847, in startService

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     mailer.purge()

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/mail.py", line 951, in purge

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     datetime.timedelta(days=self.days))

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/mail.py", line 744, in purgeOldTokens

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     """, before

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/sql.py", line 339, in _db_execute

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     q = self._db().cursor()

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]   File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twis tedcaldav/sql.py", line 95, in _db

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-]     raise DatabaseError("Unable to open database %s" % (self.dbpath,))

2012-12-22 11:26:55-0700 [-] [mailgateway] 2012-12-22 11:26:55-0700 [-] sqlite3.DatabaseError: Unable to open database /Volumes/Data HD/Library/Server/Calendar and Contacts/Data/mailgatewaytokens.sqlite

 

When trying to connect to my calendar on the client machine, I get the following message:

The request for account “rocking-mm.com Calendar” failed.

 

The server responded with

“500”

to operation CalDAVAccountRefreshQueueableOperation.

 

Any suggestions on how to correct these problems?

 

Thanks!

~Mike

OS X Server, 4GB RAM, Mountain Lion

Posted on Dec 22, 2012 10:34 AM

Close

Q: Calendar Service Permission Problems

  • All replies
  • Helpful answers

Page 1 Next
  • by Linc Davis,

    Linc Davis Linc Davis Dec 22, 2012 2:18 PM in response to Miggl
    Level 10 (208,027 points)
    Applications
    Dec 22, 2012 2:18 PM in response to Miggl

    You're storing server data on a secondary volume, which ensures that you will trigger every possible bug. If you choose to go that route, you need to become an expert troubleshooter. The article linked below may help.

     

    Restoring OS X Server from a Time Machine backup

  • by Miggl,

    Miggl Miggl Dec 22, 2012 6:40 PM in response to Linc Davis
    Level 1 (77 points)
    Dec 22, 2012 6:40 PM in response to Linc Davis

    Hi Linc,

     

    I am learning as I go, hence I am asking here on these forums. I have read those apple documents countless times, and they are next to useless, in no way do they show advanced terminal commands. You helped me learn the appropriate commands for postfix and postgres in another post. Would you be able to provide some guidance as to how to repair permission for the calendar as well?

     

    Anecdote: to be honest, I have yet to find a comprehensive resource that illustrates terminal commands and other more complex server management tasks. Evern the books that are supposedly geared toward server certification only show what can be done through the GUI, not actual usefull things like terminal commands, permission fixes, etc. So the only option left is to learn from those that have come before.

    For example, http://www.peachpit.com/store/apple-pro-training-series-os-x-server-essentials-u sing-9780321887337 comes nowhere close to tackling this type of issue, and this was the most advanced book I have been able to find. I have also been taking all the OS X Server tutorials on Lynda.com, but that's just the basic stuff. So from what I can tell, all the really advanced stuff is self-tought.

     

    Thanks!

    ~Mike

  • by Linc Davis,Helpful

    Linc Davis Linc Davis Dec 22, 2012 7:42 PM in response to Miggl
    Level 10 (208,027 points)
    Applications
    Dec 22, 2012 7:42 PM in response to Miggl

    I'm not sure why you think the problem has to do with permissions. It looks like database corruption to me. However, if you want to check the permissions, this is what I have:

    ls -Ral /Library/Server/Calendar\ and\ Contacts/Data
    total 128
    drwxr-x---  8 _calendar  _calendar    272 Dec 22 19:38 .
    drwxr-xr-x  4 root       wheel        136 Jul 30 16:04 ..
    drwxr-x---  3 _calendar  _calendar    102 Jul 30 16:07 Documents
    -rw-r--r--  1 _calendar  _calendar  24576 Jul 30 16:07 mailgatewaytokens.sqlite
    -rw-r--r--  1 _calendar  _calendar    512 Jul 30 16:07 mailgatewaytokens.sqlite-journal
    -rwxr-xr-x  1 _calendar  _calendar      6 Dec 22 19:38 memberships_cache
    -rw-r--r--  1 _calendar  _calendar  28672 Dec  6 20:44 proxies.sqlite
    -rwxr-xr-x  1 _calendar  _calendar     79 Jul 30 16:04 resources.xml
    
    /Library/Server/Calendar and Contacts/Data/Documents:
    total 8
    drwxr-x---  3 _calendar  _calendar  102 Jul 30 16:07 .
    drwxr-x---  8 _calendar  _calendar  272 Dec 22 19:38 ..
    -rw-r--r--  1 _calendar  _calendar    1 Jul 30 16:07 .calendarserver_version
    

    It's not clear whether you actually tried the procedure recommended in the article. If you did, and it didn't work, I doubt that I know anything else that would be of any use to you. I certainly don't know how to fix a corrupt database.

  • by Linc Davis,

    Linc Davis Linc Davis Dec 22, 2012 7:46 PM in response to Linc Davis
    Level 10 (208,027 points)
    Applications
    Dec 22, 2012 7:46 PM in response to Linc Davis

    I certainly don't know how to fix a corrupt database.

     

    On second thought, maybe I do. Export all calendars and contact on the clients. Wipe the data on the server. Import the data you exported on the clients.

  • by Miggl,

    Miggl Miggl Dec 22, 2012 7:47 PM in response to Linc Davis
    Level 1 (77 points)
    Dec 22, 2012 7:47 PM in response to Linc Davis

    Here is my output:

    ls -Ral /Library/Server/Calendar\ and\ Contacts/Data

    total 136

    drwxr-x---  9 serveradmin  admin        306 Dec 16 10:25 .

    drwxr-xr-x  4 root         wheel        136 Dec 16 10:25 ..

    drwxr-x---  3 serveradmin  admin        102 Aug 12 11:11 Documents

    -rw-r--r--  1 serveradmin  staff        677 Aug 12 11:13 augments.xml

    -rw-r--r--  1 serveradmin  staff      24576 Aug 12 11:11 mailgatewaytokens.sqlite

    -rw-r--r--  1 serveradmin  staff        512 Aug 12 11:11 mailgatewaytokens.sqlite-journal

    -rwxr-xr-x  1 serveradmin  staff          6 Dec 14 12:17 memberships_cache

    -rw-r--r--  1 _calendar    _calendar  28672 Dec  9 18:00 proxies.sqlite

    -rwxr-xr-x  1 _calendar    _calendar    155 Aug 12 11:13 resources.xml

     

     

    /Library/Server/Calendar and Contacts/Data/Documents:

    total 8

    drwxr-x---  3 serveradmin  admin  102 Aug 12 11:11 .

    drwxr-x---  9 serveradmin  admin  306 Dec 16 10:25 ..

    -rw-r--r--  1 serveradmin  staff    1 Aug 12 11:11 .calendarserver_version

     

     

     

    ls -Ral /Volumes/Data\ HD/Library/Server/Calendar\ and\ Contacts/Data

    total 136

    drwxr-x---  9 serveradmin  admin        306 Dec 17 22:18 .

    drwxr-xr-x  3 root         wheel        102 Dec 16 14:33 ..

    drwxr-x---  3 serveradmin  admin        102 Aug 12 11:11 Documents

    -rw-r--r--  1 serveradmin  staff        677 Aug 12 11:13 augments.xml

    -rw-r--r--  1 serveradmin  staff      24576 Aug 12 11:11 mailgatewaytokens.sqlite

    -rw-r--r--  1 serveradmin  staff        512 Aug 12 11:11 mailgatewaytokens.sqlite-journal

    -rwxr-xr-x  1 serveradmin  staff          6 Dec 17 22:18 memberships_cache

    -rw-r--r--  1 _calendar    _calendar  28672 Dec  9 18:00 proxies.sqlite

    -rwxr-xr-x  1 _calendar    _calendar    155 Aug 12 11:13 resources.xml

     

     

    /Volumes/Data HD/Library/Server/Calendar and Contacts/Data/Documents:

    total 8

    drwxr-x---  3 serveradmin  admin  102 Aug 12 11:11 .

    drwxr-x---  9 serveradmin  admin  306 Dec 17 22:18 ..

    -rw-r--r--  1 serveradmin  staff    1 Aug 12 11:11 .calendarserver_version

    rocking-mm:~ serveradmin$

     

     

    The reason I suspect permissions and ACL issues is because I followed those documents to restore from Time Machine, and you saw what we had to do to postfix to get email to work. Comparing my output to yours, it's obviously different (for what reason I have no idea).

  • by Miggl,

    Miggl Miggl Dec 22, 2012 7:49 PM in response to Linc Davis
    Level 1 (77 points)
    Dec 22, 2012 7:49 PM in response to Linc Davis

    Unfortunately my clients aren't showing any information in the calendar . It has a warning triangle next to it, and when clicked provides the output:

    The request for account “rocking-mm.com Calendar” failed.

     

    The server responded with

    “500”

    to operation CalDAVAccountRefreshQueueableOperation.

    That would have been a quick fix though, if I had access to all the users' computers (I have a remote user that only connects via iOS, so I couldn't do this procedure in that case).

  • by Miggl,

    Miggl Miggl Dec 22, 2012 7:51 PM in response to Linc Davis
    Level 1 (77 points)
    Dec 22, 2012 7:51 PM in response to Linc Davis

    I have a hunch that restoring from Time Machine added the serveradmin as the owner and staff as the group to all files that were restored, as well as adding the ACLs for the serveradmin user.

  • by Miggl,

    Miggl Miggl Dec 22, 2012 8:05 PM in response to Miggl
    Level 1 (77 points)
    Dec 22, 2012 8:05 PM in response to Miggl

    Before I go running off half-cocked, the following command would fix the issue, correct?

    sudo chown -R _calendar:_calendar /Volumes/Data\ HD/Library/Server/Calendar\ and\ Contacts/Data

    And then to remove any ACLs across the board for all services:

    sudo chmod -RN /Volumes/Data\HD/Library

     

    Are there other directories I should consider as well (i.e. is the Data directory owned by _calendar as well -- as indicated by the "." ownership)?

     

    Thanks!

    ~Mike

  • by Linc Davis,Solvedanswer

    Linc Davis Linc Davis Dec 22, 2012 8:07 PM in response to Miggl
    Level 10 (208,027 points)
    Applications
    Dec 22, 2012 8:07 PM in response to Miggl

    I don't know which of those two locations is the one where your server expects to find the data. But obviously, the permissions of both are indeed wrong. You can correct them both this way, after backing up all data:

     

    sudo chown -R _calendar:_calendar {,/Volumes/*}/Library/Server/Calendar\ and\ Contacts/Data

     

    WARNING: That command is to be copied and pasted into a Terminal window, not typed.

     

    Restart the Calendar service and see whether there's an improvement.

  • by Miggl,

    Miggl Miggl Dec 22, 2012 8:16 PM in response to Linc Davis
    Level 1 (77 points)
    Dec 22, 2012 8:16 PM in response to Linc Davis

    Halleluya!! Thanks for hanging in there with me. Looks like its working. I'm able to add events and locations again. All the other service folders appear to be in order.

    Thanks for your help!

  • by Miggl,

    Miggl Miggl Dec 22, 2012 8:28 PM in response to Linc Davis
    Level 1 (77 points)
    Dec 22, 2012 8:28 PM in response to Linc Davis

    Ah, I just found another directory that might be borked. Could you check what owner/group you have on /Library/Server/Software\ Update? It looks like everything on mine is set to my serveradmin user, and has a bunch of ACLs across the board.

  • by Linc Davis,

    Linc Davis Linc Davis Dec 22, 2012 8:46 PM in response to Miggl
    Level 10 (208,027 points)
    Applications
    Dec 22, 2012 8:46 PM in response to Miggl

    _softwareupdate:_softwareupdate

  • by Miggl,

    Miggl Miggl Dec 22, 2012 8:48 PM in response to Linc Davis
    Level 1 (77 points)
    Dec 22, 2012 8:48 PM in response to Linc Davis

    Thanks, can I apply the same logic to it and all its subdirectories as well?

    sudo chown -R _softwareupdate:_softwareupdate {,/Volumes/*}/Library/Server/Software\ Update

  • by Linc Davis,Helpful

    Linc Davis Linc Davis Dec 22, 2012 9:30 PM in response to Miggl
    Level 10 (208,027 points)
    Applications
    Dec 22, 2012 9:30 PM in response to Miggl

    I think so, but I don't use that service.

Page 1 Next