Posted on 2004-11-11
Last Modified: 2013-12-26
I'm using an ncftpget command to retrieve a file from another server. My command looks like this
ncftpget -e stdout.out -u $USER -p $PASSWORD $SERVER $OUTGOING/$FTPFILE $FTPFILE

$OUTGOING is a path where this file is to be placed
$FTPFILE is a name of a file it is located in the root directory of that server

What am I doing wrong? It doesn't get transfered?
Question by:mlevin1220
    LVL 14

    Accepted Solution

    What error message are you getting back?

    Some possible issues I can think of include:
    o Wrong passworw
    o $OUTGOING doesn't exist or don't have write permissions there
    o $FTPFILE has just the base-name (fubar vs. /fubar) and the FTP server is setting your directory to $USER's home directory by default)
    o $USER doesn't have permission to read $FTPFILE on $SERVER (including that $SERVER doesn't allow $USER to access anything outside $USER's home directory)

    And of course, passing the password on the command line allows anyone on the same system to view it using 'ps', while passing it via FTP allows anyone on the network to view it with a sniffer (use SSH with keys if this is not acceptable).
    LVL 12

    Expert Comment

    > use SSH with keys
    I strongly second that. Don't use FTP when you can use scp/sftp.


    LVL 5

    Expert Comment

    Try this,

    ncftpget -e stdout.out -u $USER -p $PASSWORD $SERVER $OUTGOING $FTPFILE

    The name of the file in local directory ($OUTGOING) is ommited because ncftpget is expecting a directory to store the $FTPFILE.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now