kanogisi has asked for the wisdom of the Perl Monks concerning the following question:

I am relatively new to perl programming and have been given the task of writing a web interface (running on a secure port) to turn telnet/ftp off and on. Its also being requested that I turn these on with a timeout value that the daemon is only available for x minutes. I know I could set the bit on the pl file but I would really like to avoid this. I've seen some brief mention of setuid within perl, sudoperl and a few other things yet have been unable to locate any useful docs on these issues. Any help would be greatly appreciated

Replies are listed 'Best First'.
Re: setuid info?
by stefan k (Curate) on May 18, 2001 at 19:19 UTC
    Well, putting "setuid" in the search box in perlmonks gives a discussion about this topic for me. That'll help? If not try: to search for "suidperl"
    Actually I don't know whether those discussions are valuable for you, it's just the first thing to do. As a matter of fact I have never used suidperl or it's friends ;-)

    Regards... Stefan

Re: setuid info?
by kschwab (Vicar) on May 19, 2001 at 17:48 UTC
    Some ideas:
    • perldoc perlsec
    • The -T switch, see "perldoc perlrun"
    • Utilities like sudo and super that attempt to wrap a little more sanity around setuid programs.
    • The tcp wrappers package, which would allow you to "turn on and off" access to the telnet and ftp daemons based on the client's ip address.
    Good luck!