Help with FTP Script

Discussion in 'Programming/Scripts' started by FMccloud, Aug 24, 2010.

  1. FMccloud

    FMccloud New Member

    Hi everybody:

    I try to backup mpg videos with this script:

    Code:
    #!/bin/bash
    
    HOST=myip
    USER=user
    PASSWD=mypasswd
    fecha=`date +%d%B%Y`
    
    mkdir backup_$fecha
    cd backup_$fecha
    
    ftp -in $HOST<<EOF
    user $USER $PASSWD
    binary
    mget *.mpg
    quit
    EOF
    
    tar -czf backup_$fecha.tar.gz *.mpg
    rm -rf *.mpg
    exit
    
    I use cron, and every Friday at 3 p.m. execute this script. But the problem it´s that only copy 3 files. And I receive this message:

    Code:
    [[email protected]~]$./backupmpg.sh
    Please login with USER and PASS
    Please login with USER and PASS
    KERBEROS_V4 rejected as an authentication type
    No control connection for command: No such file or directory
    Passive mode refused. Turning off passive mode.
    No control connection for command: No such file or directory
    No control connection for command: No such file or directory
    No control connection for command: No such file or directory
    ... And so until the number of files .mpg
    
    I think the problem is "Passive mode refused", is there someone that knows how to solve this problem. Because I think that the script it´s making all right. In other words the problem is at the remote server.

    Greetings and thanks!!!
     

Share This Page