From: John Clisham Date: 2007-05-01T06:16:42+09:00 Subject: Re: run 'some' code as a different user? NET::SSH? Jano Svitok wrote: > On 4/30/07, John Clisham wrote: >> >> calling everything in shell's and reading in stdout. I'm trying to stay >> completely in Ruby here. >> >> THanks! >> KF > > Ruby is one process to the OS - so most probably it cannot have > credentials of more users. What you can do is have 'session' have > another process running with respective user's credentials and > communicate with it with drb or similar. You would need to keep a pool > of these and kill/stop them when the session is done or timeouted. > > You probably won't be able to avoid more processes though, but you may > avoid communicating through stdout. > > Or, maybe you can avoid all of this if the user under which the the > webserver is running has rights to users' files (i.e. they all belong > to the same group and have the rights set appropriately). > > Finally, you will want to double-check your code for security issues... > > HTH. > J. J. Very helpful thanks! Ironically, I was just starting to look into this method. Looks like my 'little' app just got much more complex! Thanks! John -- Posted via http://www.ruby-forum.com/.