Opened 4 years ago

Closed 4 years ago

#4351 defect closed worksforme (worksforme)

After upgrading from 9.0.0 to 10.0.0 cannot set uid, gid

Reported by: alecm3 Owned by: alecm3
Priority: normal Milestone:
Component: core Keywords:
Cc: exarkun Branch:
Author: Launchpad Bug:

Description (last modified by exarkun)

New error in 10.0.0 (same code works with 9.0.0)

2010-03-05 17:39:45-0800 [-] Traceback (most recent call last):
2010-03-05 17:39:45-0800 [-]   File "/usr/local/bin/twistd", line 5, in <module>
2010-03-05 17:39:45-0800 [-]     pkg_resources.run_script('Twisted==10.0.0', 'twistd')
2010-03-05 17:39:45-0800 [-]   File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 489, in run_script
2010-03-05 17:39:45-0800 [-]   File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 1207, in run_script
2010-03-05 17:39:45-0800 [-]   File "/nail/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/EGG-INFO/scripts/twistd", line 19, in <module>
2010-03-05 17:39:45-0800 [-]     run()
2010-03-05 17:39:45-0800 [-]   File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/twisted/scripts/twistd.py", line 27, in run
2010-03-05 17:39:45-0800 [-]     app.run(runApp, ServerOptions)
2010-03-05 17:39:45-0800 [-]   File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/twisted/application/app.py", line 693, in run
2010-03-05 17:39:45-0800 [-]     runApp(config)
2010-03-05 17:39:45-0800 [-]   File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/twisted/scripts/twistd.py", line 23, in runApp
2010-03-05 17:39:45-0800 [-]     _SomeApplicationRunner(config).run()
2010-03-05 17:39:45-0800 [-]   File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/twisted/application/app.py", line 423, in run
2010-03-05 17:39:45-0800 [-]     self.postApplication()
2010-03-05 17:39:45-0800 [-]   File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/twisted/scripts/_twistd_unix.py", line 205, in postApplication
2010-03-05 17:39:45-0800 [-]     self.startApplication(self.application)
2010-03-05 17:39:45-0800 [-]   File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/twisted/scripts/_twistd_unix.py", line 316, in startApplication
2010-03-05 17:39:45-0800 [-]     self.shedPrivileges(self.config['euid'], uid, gid)
2010-03-05 17:39:45-0800 [-]   File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/twisted/scripts/_twistd_unix.py", line 287, in shedPrivileges
2010-03-05 17:39:45-0800 [-]     switchUID(uid, gid, euid)
2010-03-05 17:39:45-0800 [-]   File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/twisted/python/util.py", line 677, in switchUID
2010-03-05 17:39:45-0800 [-]     initgroups(uid, gid)
2010-03-05 17:39:45-0800 [-]   File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-x86_64.egg/twisted/python/util.py", line 636, in initgroups
2010-03-05 17:39:45-0800 [-]     return _c_initgroups(pwd.getpwuid(uid)[0], primaryGid)
2010-03-05 17:39:45-0800 [-] OSError: [Errno 1] Operation not permitted

OS: Ubuntu 8.04

Change History (5)

comment:1 Changed 4 years ago by exarkun

  • Author Alec Matusis deleted
  • Description modified (diff)

Fixing description markup.

comment:2 Changed 4 years ago by exarkun

  • Cc exarkun added

Can you describe your environment in more detail? For example, what UID and GID is starting the process, what UID and GID is it trying to switch to, is there anything unusual about how users and groups are managed on your site?

comment:3 Changed 4 years ago by glyph

  • Owner changed from glyph to alecm3

comment:4 Changed 4 years ago by glyph

  • Keywords gid removed

This works on all the systems I've tried it on, but if you can report more information about where this failed, it would be really useful. When you do, please reopen this ticket and we'll try to address it, as this would be a serious regression.

comment:5 Changed 4 years ago by glyph

  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.