From: Rick Date: 2001-09-27T05:52:47+09:00 Subject: [ruby-talk:21750] Re: Running ruby scripts suid-root the reason you can't do this is that when you run the script, that #!/usr/local/bin/ruby at the beginning is telling your shell that what you want to run is /usr/local/bin/ruby ruby-script so you would need to have ruby suid root, not the script. And that would be pretty insecure. Probably more info than you wanted, but the c wrapper seems like the way to go. rick Kent Dahl writes: > "Florian G. Pflug" wrote: > > How can I run a ruby script suid root? > > I tried setting both the script, and the interpreter to mode 4755, but I > > still doesn't work. > > I haven't tried running a Ruby script suid root, but I had to run one > suid user once. The secure solution proposed by the local gurus were to > use a C wrapper program that is suid user. > > I don't remember the original url, but a quick searched showed this: > http://www.tesol.net/scripts/Otherstuff/setuid.html#yourwrap > > -- > <[ Kent Dahl ]>================<[ http://www.stud.ntnu.no/~kentda/ ]> > )____(stud.techn.;ind.�k.data)||(softwareDeveloper.at(Trustix))_( > /"Opinions expressed are mine and not those of my Employer, "\ > ( "the University, my girlfriend, stray cats, banana fruitflies, " ) > \"nor the frontal lobe of my left cerebral hemisphere. "/ -- Well, this privacy you're concerned about is largely an illusion. All you have to give up is your illusions, not any of your privacy. - Larry Ellison, CEO Oracle on creating a national identification system, fingerprinting all Americans. Scary, eh?