Re: [Rails] ruby edit sudo file
On Mon, Dec 23, 2013 at 12:59 AM, saravanan p wrote: > I am trying to edit apache2 https.config file which require sudo > permission through my ruby scripting. > > Be very very careful with this. It can easily leave you wide open to a hack. Assuming you do really mean a ruby script, and nothing in your Rails app, you can set the setuid bit with chmod and chown the script to root. When it executes, it will execute with root persmissions. Given you've not been able to find this information yourself, I'd again caution you not to do this. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t-rUZfZ0WNB__f6mZb%3DLmWFF%3DxvTcrtxSwYeBQsvb_SsQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] ruby edit sudo file
Hello friends I am trying to edit apache2 https.config file which require sudo permission through my ruby scripting. File.open(local_filename, 'a') { |f| f.write(doc) } I can open and edit normal file which doesn't require sudo permission. I am searching around two hours but still not find any solution, Can anyone suggest any idea or any links? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ae778d34-f98a-42b0-8b63-2c68c9836196%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: "no such file to load -- my_extensions (MissingSourceFile)"
Many thanks to you both - indeed, I was being a muppet, and it's exactly as you suspected, namely I'd forgotten to copy across a file. Grep'ing for the file name helped me track it down. Thanks again and Merry Christmas! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8357a01acf4360b7bb953a7c04310609%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.