Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Rhat es 3 - ftp script - works 'by hand'/fails from cron - auth gssapi/kerberos issue

  • 31-05-2005 4:55pm
    #1
    Registered Users, Registered Users 2 Posts: 944 ✭✭✭


    Probably been asked a thousand times!

    A shell script contains
    ftp -i -n -u < ftp.sf > ftp.out 2>&1
    if [ -s ftp.out ];then
    echo "FAILED" >> $rpt
    else
    echo "OK" >> $rpt
    fi

    ftp.sf contains
    open diver
    user abc abc123
    cd raw_data/dbc
    put diver.file
    bye


    If I run the script 'by hand', it works fine. If I run it from a cron - no joy.
    The ftp.out file has 'ftp: u: unknown option' in it - so the test in the script assumes failure.


    -- More info - If i do this / I get this...

    [frank@BWGA scripts]$ ftp -inu diver2
    Connected to diver2.
    220 diver2 Microsoft FTP Service (Version 5.0).
    ftp>


    [frank@BWGA scripts]$ ftp -in diver2 <- 'u' taken out
    Connected to diver2.
    220 diver2 Microsoft FTP Service (Version 5.0).
    500 'AUTH GSSAPI': command not understood
    500 'AUTH KERBEROS_V4': command not understood
    KERBEROS_V4 rejected as an authentication type
    ftp>

    What's the issue with running it from the script?
    What does is output the 'ftp: u: unknown option' when run from the cron and how do I stop it?


Comments

  • Registered Users, Registered Users 2 Posts: 78 ✭✭de8o


    might be down to PATH statement. echo your path and the get cron to echo path variable. If different, and they often are, it could be that you are using ftp from different locations.

    Fix. Give full paths to everything in your script.


Advertisement