I'm trying to do a rsync on a folder generated by ruby on Rails.
But the main problem is that every generated stuff is nobody nobody.
So I'm trying to chown, but the ruby service through apache is not root.
So I wonder how can I execute action as a root.
Is there any sudo stuff in ruby so I can do my chown on my files an
directories, then an rsync.
You can execute commands in Ruby using backticks (e.g. `sudo chown`) but
I think the truly solution lies in fixing the permissions in the first
place. Try to configure the user that the Rails instance runs as. How to
do that depends on if you're using FastCGI, Mongrel or mod_rails.