Skip to content
This repository has been archived by the owner. It is now read-only.

memcached error on CS when I input a new event #233

Closed
macosforgebot opened this issue Jul 18, 2008 · 6 comments
Closed

memcached error on CS when I input a new event #233

macosforgebot opened this issue Jul 18, 2008 · 6 comments

Comments

@macosforgebot
Copy link

@macosforgebot macosforgebot commented Jul 18, 2008

filippos@… originally submitted this as ticket:295

  • Version: trunk
  • Keywords: memcached

error on CS when I input a new event

[memcached] can't run as root without the -u switch
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jul 18, 2008

@wsanchez originally submitted this as comment:1:⁠ticket:295


Hrm. Yes. Here's a work-around until we fix this... add -u calendar to the list of options passed to memcached. For example:

  <!-- Support for Memcached -->
  <key>Memcached</key>
  <dict>
    <key>Options</key>
    <array>
      <string>-u</string>
      <string>calendar</string>
    </array>
  </dict>
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jul 19, 2008

filippos@… originally submitted this as comment:2:⁠ticket:295


this is not working, same error at start

2008-07-19 08:43:25+0300 [-] [caldav-8008]  [-] twisted.web2.channel.http.HTTPFactory starting on 8443
2008-07-19 08:43:25+0300 [twistedcaldav.accesslog.AMPLoggingFactory] AMPLoggingProtocol connection established (HOST:UNIXSocket('logs/caldavd.sock') PEER:UNIXSocket(''))
2008-07-19 08:43:25+0300 [-] [caldav-8008]  [-] AMP connection established (HOST:UNIXSocket(None) PEER:UNIXSocket('logs/caldavd.sock'))
2008-07-19 08:43:25+0300 [-] [memcached] can't run as root without the -u switch
2008-07-19 08:43:28+0300 [-] [memcached] can't run as root without the -u switch
2008-07-19 08:43:35+0300 [-] [memcached] can't run as root without the -u switch
2008-07-19 08:43:50+0300 [-] [memcached] can't run as root without the -u switch
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jul 21, 2008

@wsanchez originally submitted this as comment:3:⁠ticket:295

  • Status changed from new to assigned
  • Priority changed from 2: Expected to 1: Blocker
  • Milestone changed from Linux Port to 2.0

From the milestone, I assume this is on Linux? Shouldn't really matter though...

Making this a P1 for 2.0.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 4, 2008

aaron.grattafiori@… originally submitted this as comment:4:⁠ticket:295


Running CalendarServer as root is NOT a good idea. Especially because you don't need any of roots permissions (its trival to add a calendar user that runs caldavd).

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 5, 2008

@wsanchez originally submitted this as comment:5:⁠ticket:295


Aaron, CalendarServer drops privileges to the user configured in its config file after doing some operations that may require root access, such as binding to the listen port (which in many cases would be port 80, a privileged port) or setting up some log files which the running server doesn't need write access to.

It is not a bad idea to start the server as root, if properly configured, but it is true than in some deployments, it may not be necessary.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Mar 9, 2009

@wsanchez originally submitted this as comment:6:⁠ticket:295

  • Status changed from assigned to closed
  • Resolution changed from to Software changed

If you are not starting as root, leave out the UserName and GroupName config options and the server will not try to drop privs and will also not pass the -u flag to memcached.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.