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');

In reply to forcing script to run as specific user by c

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.