# Setuid script - require failing

**URL:** <https://www.ruby-forum.com/t/setuid-script-require-failing/107060>\
**Category:** Ruby\
**Created:** [June 17, 2007, 1:01pm UTC](https://www.ruby-forum.com/t/setuid-script-require-failing/107060 "2007-06-17T13:01:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b487fb/32.png) [@gga](https://www.ruby-forum.com/u/gga)\
**Post date:** [June 17, 2007, 1:01pm UTC](https://www.ruby-forum.com/t/setuid-script-require-failing/107060/1 "2007-06-17T13:01:02Z")

</div>

ruby 1.8.5 and 1.9

I have a script that I am trying to run as setuid. I’ve created a  
simple C wrapper program for it that calls exec and invokes the  
script.  
This wrapper program is set to another user (not root), chmod 4755.  
The directory where the wrapper and script is chowned to root, with  
0755.  
The script runs fine, with a taint level of 1.

However, any:

require ‘something’

fails with:

in `require’: Insecure operation - require (SecurityError)

as if the string was tainted. Unfortunately, ruby does not seem too  
helpful in explaining what the issue is.

* * *

## I also replaced the script with a two line script in Perl, and Perl allows me to require any of its modules just fine.

Any ideas?
