Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't start with python-daemon 2.1.0 installed #17

Closed
OmeGak opened this issue Nov 26, 2015 · 2 comments
Closed

Can't start with python-daemon 2.1.0 installed #17

OmeGak opened this issue Nov 26, 2015 · 2 comments
Labels

Comments

@OmeGak
Copy link

OmeGak commented Nov 26, 2015

I was getting this when trying to start:

Traceback (most recent call last):
  File "/home/omegak/.linuxbrew/bin/maildump", line 11, in <module>
    sys.exit(main())
  File "/home/omegak/.linuxbrew/Cellar/python/2.7.10_2/lib/python2.7/site-packages/maildump_runner/__main__.py", line 130, in main
    context.open()
  File "/home/omegak/.linuxbrew/Cellar/python/2.7.10_2/lib/python2.7/site-packages/maildump_runner/geventdaemon.py", line 37, in open
    super(GeventDaemonContext, self).open()
  File "/home/omegak/.linuxbrew/Cellar/python/2.7.10_2/lib/python2.7/site-packages/daemon/daemon.py", line 370, in open
    change_process_owner(self.uid, self.gid, self.initgroups)
  File "/home/omegak/.linuxbrew/Cellar/python/2.7.10_2/lib/python2.7/site-packages/daemon/daemon.py", line 642, in change_process_owner
    raise error
daemon.daemon.DaemonOSEnvironmentError: Unable to change process owner ([Errno 1] Operation not permitted)

change_process_owner() uses setuid()

@ThiefMaster
Copy link
Owner

problem with python-daemon>=2.1 i guess

@ThiefMaster
Copy link
Owner

Actually this wasn't caused by setuid - both setuid and setgid don't require any extra permissions when "changing" the uid/gid to the current one. The problem is that 2.1 started using os.initgroups() which apparently does require root privs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants