http://www.perlmonks.org?node_id=171971

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

I have a feeling the short answer to this question is 'use cvs' but i'm foraging ahead since i have no experience with cvs and a fair amount with rcs...

I'm writing a script that will pull down router configs via tftp and I would like them to be written to an rcs guarded file on the server. Checking out the config is not a problem, however rcs only gives write permission to the file owner. Tftpd writes files as 'nobody'. In the hopes of checking the config file out as 'nobody' I did a

chown nobody scriptname
chmod 4755 scriptname

But to no avail. The script still checks out the config file from rcs as the actual uid of the individual running the script. Is this something I need to follow up with in my script's code, or am I just not understanding using the setuid bit? My code snip is as follows:

#!/usr/bin/perl -w use strict; use Net::SNMP; use Rcs; my $rcs = Rcs->new; $rcs->rcsdir("/usr/local/tftp/RCS"); $rcs->file("router.cfg"); $rcs->co('-l'); &copy_config_from_tftp; $rcs->ci('-u');