in reply to Failure with rcp

At the risk of being too obvious, what happens when you do a test of this exact command from the command line?

Malk
*I lost my .sig. Do you have a spare?*

Replies are listed 'Best First'.
RE: Re: Failure with rcp
by magnus (Pilgrim) on Oct 26, 2000 at 19:37 UTC
    it work's spiffy... no problem... which makes me think that rcp is somehow "failing" when run from the child process, but find when run from the command... magnus
      So what is the difference between your child process's environment and your shell process's environment? Are you running this script via your shell prompt, or as, say, a CGI script? If the latter, there are tons of different things we can look at, like your PATH, user/ownerships, permissions, etc. If it's something like this:
      $ cat script.pl system("rcp file host:/tmp"); $ rcp file host:/tmp $ perl script.pl $
      (i.e. both *appeared* to work from this point of view, but in reality, the first rcp command succeeded in producing a file but the second did not), then we probably have a problem.

      If your script does not look as simple as the one above, consider reducing it to its simplest components that still reproduce your problem, then give us as much detail about the differences in the way you're running each script and your environment.

        hey, Fastolfe... the script isn't as simple as that, but it might as well be... the script itself is made to remotely log on to dozens of machines, read the permsissions of a dir. of files and change the ones that aren't set correctly... sometimes this means hundreds of files per machine... doing a remsh from the master machine for each file is time and resource heavy... copying a file/script to the machine and excuting it is much quicker and easier for the system... but rcp isn't working, hence my question... OS for all systems involved is HP-UX 10.20... if i simplify the script down to just enough to reproduce the problem, it looks like just what you wrote about... the rest is simply work on the permssions and logging... the script runs perfect except for this one problem... the script has the perl path in it and i run it direct from the command line... ultimately it will be run from crontab (where, i've tried, it still doesn't get rcp to work... sigh... any other way to copy a file remotely in perl?)... thanks for all the help... magnus