FTP Errors?

From: Jas (jason.gerfen_at_scl.utah.edu)
Date: 02/19/04

  • Next message: Joel: "Re: Could I put commands in a variable"
    To: beginners@perl.org
    Date: Thu, 19 Feb 2004 11:11:13 -0700
    
    

    Still new to using Perl, any help with this is appreciated.

    Code...
    #!/usr/bin/perl
    # Backup 192.168.0.1 web directory
    # to 192.168.0.2 via FTP

    # Begin remote transfer of file to ODIN for storage #
    use Net::FTP;
    $ftp = Net::FTP->new("192.168.0.2", Debug => 1)
      or die "Could establish conneciton to 192.168.0.2: $@";

    $ftp->login("user", 'password')
      or die "Could not login ", $ftp->message;

    $ftp->put(`../path/to/*-www.tar.gz`)
      or die "Could not transfer files ", $ftp->message;

    $ftp->quit;

    Error...
    Net::FTP>>> Net::FTP(2.71)
    Net::FTP>>> Exporter(5.566)
    Net::FTP>>> Net::Cmd(2.24)
    Net::FTP>>> IO::Socket::INET(1.26)
    Net::FTP>>> IO::Socket(1.27)
    Net::FTP>>> IO::Handle(1.21)
    Net::FTP=GLOB(0x8133e3c)<<< 220-Development FTP Server
    Net::FTP=GLOB(0x8133e3c)<<< FTPd 1.81.00 (Mar 3 2002) Ready
    Net::FTP=GLOB(0x8133e3c)<<< 220 Please enter your user name.
    Net::FTP=GLOB(0x8133e3c)>>> user user
    Net::FTP=GLOB(0x8133e3c)<<< 331 User name okay, Need password.
    Net::FTP=GLOB(0x8133e3c)>>> PASS ....
    Net::FTP=GLOB(0x8133e3c)<<< 230 User logged in.
    sh: line 1: ../path/to/02192004-www.tar.gz: Permission denied
    fileparse(): need a valid pathname at /usr/lib/perl5/5.8.0/Net/FTP.pm
    line 705

    Thanks in advance,
    Jas


  • Next message: Joel: "Re: Could I put commands in a variable"

    Relevant Pages

    • Cant run ftp script in Scheduled Tasks to external IP
      ... I was trying to automate a backup on my Windows XP machine and ftp the ... @rem Ftp the backup to an an FTP server in LA ...
      (microsoft.public.windowsxp.general)
    • Re: FTP download failure - fails at exactly the same point in the transfer file.
      ... command line ftp utility. ... backup file it failed at about 48Mb. ... download got stuck mid-way. ... server is broke too. ...
      (microsoft.public.windows.server.general)
    • Re: Scheduled Backup w/ WebDAV???
      ... you write a batch file that calls the FTP commands to copy/backup ... It just runs on a schedule just like a backup program would. ... > doesn't allow the backup to be saved to a web folder. ...
      (microsoft.public.inetserver.iis)
    • Re: [opensuse] Ftp cron job stopped working
      ... webserver and downloads several backup files that are created four ... Basically what it does is connects to the ftp server, ... Looking at the script and the crontab definition the call to sh in the ...
      (SuSE)
    • Re: FTP transfer - Low disk space
      ... > FTP, the client receiving the backup material promps a "Low Disk space" ... > Knowing that the source of low disk space is in part due to the huge TIF, ...
      (microsoft.public.windowsxp.perform_maintain)