From: Guido De Rosa Date: 2010-10-19T08:20:22+09:00 Subject: Re: su {block of code.} Tony Arcieri: > You could obtain an object over DRb and instance eval the block in the > scope > of the DRb object. > > Any methods executed would be called on the DRb object. Still doesn't work. server.rb, run as root: DRb.start_service(URI, self) # export the 'main' Object client.rb, as a normal user: o = DRbObject.new_with_uri(SERVER_URI) #=> main o.instance_eval do ::File.open('/TEST', 'w'){|f| f.puts 'hello'} end I keep getting a Permission Denied error (Errno::EACCES) And if I change '/TEST' into '/tmp/TEST', It's clearly seen that the file has been created by the normal user, not by root. G. -- Posted via http://www.ruby-forum.com/.