apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
484 stars 136 forks source link

OSError: [Errno 1] Operation not permitted: './data/logs/state/caldavd.sock' #492

Closed f1-outsourcing closed 7 years ago

f1-outsourcing commented 7 years ago

2017-06-24T17:03:21+0200 [calendarserver.tap.caldav.CalDAVServiceMaker#warn] Deleting stale socket file (not accepting connections): ./data/logs/state/caldavd.sock 2017-06-24T17:03:21+0200 [stderr#error] Traceback (most recent call last): 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/.develop/virtualenv/bin/twistd", line 11, in 2017-06-24T17:03:21+0200 [stderr#error] load_entry_point('Twisted==16.6.0', 'console_scripts', 'twistd')() 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/.develop/virtualenv/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 29, in run 2017-06-24T17:03:21+0200 [stderr#error] app.run(runApp, ServerOptions) 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/.develop/virtualenv/lib/python2.7/site-packages/twisted/application/app.py", line 648, in run 2017-06-24T17:03:21+0200 [stderr#error] runApp(config) 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/.develop/virtualenv/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 25, in runApp 2017-06-24T17:03:21+0200 [stderr#error] _SomeApplicationRunner(config).run() 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/.develop/virtualenv/lib/python2.7/site-packages/twisted/application/app.py", line 383, in run 2017-06-24T17:03:21+0200 [stderr#error] self.postApplication() 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/.develop/virtualenv/lib/python2.7/site-packages/twisted/scripts/_twistd_unix.py", line 248, in postApplication 2017-06-24T17:03:21+0200 [stderr#error] self.startApplication(self.application) 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/.develop/virtualenv/lib/python2.7/site-packages/twisted/scripts/_twistd_unix.py", line 435, in startApplication 2017-06-24T17:03:21+0200 [stderr#error] service.IService(application).privilegedStartService() 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/.develop/virtualenv/lib/python2.7/site-packages/twisted/application/service.py", line 278, in privilegedStartService 2017-06-24T17:03:21+0200 [stderr#error] service.privilegedStartService() 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/.develop/virtualenv/lib/python2.7/site-packages/twisted/application/service.py", line 278, in privilegedStartService 2017-06-24T17:03:21+0200 [stderr#error] service.privilegedStartService() 2017-06-24T17:03:21+0200 [stderr#error] File "/usr/local/calendarserver/calendarserver/tap/caldav.py", line 503, in privilegedStartService 2017-06-24T17:03:21+0200 [stderr#error] chown(fileName, getuid(), self.gid) 2017-06-24T17:03:21+0200 [stderr#error] OSError: [Errno 1] Operation not permitted: './data/logs/state/caldavd.sock'

bash-4.2$ ls -lart ./data/logs/state/ total 0 drwxr-x--- 3 caldav caldav 37 Jun 24 16:16 .. srw-rw---- 1 caldav caldav 0 Jun 24 17:03 caldavd.sock drwxrwx--- 2 caldav caldav 26 Jun 24 17:03 .

dreness commented 7 years ago

I suspect this is related to your other issue regarding dropping privs. If this still happens after you remove the user / group name from your config, we can dig deeper. Will leave this one open for now; let us know if the suggested change solves this for you.

f1-outsourcing commented 7 years ago

could be i switched back to caldavd-test.plist, then this disappeared.