From: Moritz Reiter Date: 2006-12-24T21:55:07+09:00 Subject: "su user -c 'command'" from within ruby Hi, I want to invoke a shell command from within ruby but as another user in a Linux environment. I start the ruby script itself as root and in the script I do something like this: %x{su some_user -c "some_command"} some_more_ruby_stuff The problem is: 'some_command' gets successfully executed, but the ruby script seems to never return to normal operation. 'some_more_ruby_stuff' gets never executed. Could anyone tell me why this happens and maybe what I could do about it? Regards, Moritz