starting zope with su instead of -u
This feels like a huge newbie question, but I'm starting to lose hair and I was surprised not to find anything helpful in the archives. I want to try out DirectoryStorage. I gather you're not supposed to use the -u option and obviously I don't want to run as root. So I use something like su - -c START_COMMAND zope But then I get that message about how I can't run zope as root and should read the SETUID doc. But I'm not running zope as root and the SETUID doc is distinctly unhelpful with respect to using anything other than -u to drop privileges. Is there something basic I'm missing? I'm running 2.6.1 on Gentoo, if it matters. Thanks in advance, Dylan
Dylan Reinhardt wrote:
This feels like a huge newbie question, but I'm starting to lose hair and I was surprised not to find anything helpful in the archives.
su - -c START_COMMAND zope
your zope user probably doesn't have a valid shell in the passwd database, and su is probably honoring that -- Jamie Heilman http://audible.transient.net/~jamie/ "You came all this way, without saying squat, and now you're trying to tell me a '56 Chevy can beat a '47 Buick in a dead quarter mile? I liked you better when you weren't saying squat kid." -Buddy
On Fri, 2003-05-30 at 16:54, Jamie Heilman wrote:
Dylan Reinhardt wrote:
This feels like a huge newbie question, but I'm starting to lose hair and I was surprised not to find anything helpful in the archives.
su - -c START_COMMAND zope
your zope user probably doesn't have a valid shell in the passwd database, and su is probably honoring that
I have zope set up to use bash in /etc/passwd and don't have any trouble doing su - zope at a root prompt. That's a good mistake to rule out, though. Any other thoughts? Dylan
Dylan Reinhardt wrote:
su - -c START_COMMAND zope
Any other thoughts?
Apart from syntax errors in START_COMMAND, not really. Is it a shell script? Start it with sh -x, and make sure START_COMMAND is all one token. Alternatively go grab daemontools from http://cr.yp.to and use setuidgid instead. -- Jamie Heilman http://audible.transient.net/~jamie/ "We must be born with an intuition of mortality. Before we know the words for it, before we know there are words, out we come bloodied and squalling with the knowledge that for all the compasses in the world, there's only one direction, and time is its only measure." -Rosencrantz
On Fri, 2003-05-30 at 17:10, Jamie Heilman wrote:
Dylan Reinhardt wrote:
su - -c START_COMMAND zope
Any other thoughts?
Apart from syntax errors in START_COMMAND, not really.
Rats.
Is it a shell script?
It's the incantation in my init script that was working just prior to being run su. Just to be sure... I'm correct in assuming that I *shouldn't* see that setuid error if I'm not starting as root? I guess that, at least, helps me narrow down the problem to something about su.
Start it with sh -x, and make sure START_COMMAND is all one token. Alternatively go grab daemontools from http://cr.yp.to and use setuidgid instead.
I'll give that a try. I've got daemontools anyway. Thanks, Dylan
Dylan Reinhardt wrote:
I'll give that a try. I've got daemontools anyway.
Well heck, if you've got daemontools, don't bother with su, and you might be interested in http://audible.transient.net/zope/strawweight/ I haven't tried running with an alternate storage yet, but it shouldn't take too much hacking. -- Jamie Heilman http://audible.transient.net/~jamie/ "We must be born with an intuition of mortality. Before we know the words for it, before we know there are words, out we come bloodied and squalling with the knowledge that for all the compasses in the world, there's only one direction, and time is its only measure." -Rosencrantz
Dylan Reinhardt wrote:
This feels like a huge newbie question, but I'm starting to lose hair and I was surprised not to find anything helpful in the archives.
su - -c START_COMMAND zope
Hi Dyland, maybe you should use the following syntax from the init-script (leave out the first dash): su -c "/home/zope/Zope/start" zope & Cheers, Maik
Thanks for the suggestion, Maik. Poking at this a bit more, I think I may have a more basic problem, e.g: # su zope $ whoami zope $ exit # su -c whoami zope root # Looks like it's time to see if anyone on the Gentoo list knows anything about this. Thanks again, Dylan On Sat, 2003-05-31 at 07:04, Maik Jablonski wrote:
Dylan Reinhardt wrote:
This feels like a huge newbie question, but I'm starting to lose hair and I was surprised not to find anything helpful in the archives.
su - -c START_COMMAND zope
Hi Dyland,
maybe you should use the following syntax from the init-script (leave out the first dash):
su -c "/home/zope/Zope/start" zope &
Cheers, Maik
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Sat, May 31, 2003 at 09:12:56AM -0700, Dylan Reinhardt wrote:
# su zope $ whoami zope $ exit # su -c whoami zope root #
Looks like it's time to see if anyone on the Gentoo list knows anything about this.
well, "man su" does ;-) you got the order wrong. it's su username -c command -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's SPIDER FROM MARS! (random hero from isometric.spaceninja.com)
Aarrgh! It's always the easy stuff, isn't it? Thanks for the help... I'll RTFM a little closer next time. Dylan On Sat, 2003-05-31 at 05:31, Paul Winkler wrote:
On Sat, May 31, 2003 at 09:12:56AM -0700, Dylan Reinhardt wrote:
# su zope $ whoami zope $ exit # su -c whoami zope root #
Looks like it's time to see if anyone on the Gentoo list knows anything about this.
well, "man su" does ;-) you got the order wrong. it's su username -c command
participants (4)
-
Dylan Reinhardt -
Jamie Heilman -
Maik Jablonski -
Paul Winkler