< Home

Configuring the FW as an FTP Client

This section describes the common operations on the FW which serves as an FTP client.

Procedure

  1. Log in to the FTP server.

    Different commands are available for you to log in to the FTP server from different views.
    • Set up a connection with the FTP server from the user view.

      ftp -a source-ip-address host [ port-number ] [ vpn-instance vpn-instance-name ]

    • Set up a connection with the FTP server from the FTP client view.

      open source-ip-address host [ port-number ] [ vpn-instance vpn-instance-name ]

    Parameter vpn-instance default is configured on management interface by default. When management interface is used for FTP file transfer, parameter vpn-instance default must be specified in the configuration command. The command is ftp -a source-ip-address host [ port-number ] vpn-instance default.

  2. Optional: Configure the data type and file transfer mode.

    Set the data type to ASCII code or binary.

    The default data type is ASCII.

    ascii or binary

    Set the file transfer mode to passive or active.

    The client uses the active mode to establish the data tunnel by default.

    passive or undo passive

  3. Perform common operations on the FTP client.

    Display FTP command online help.

    remotehelp [ command ]

    Upload a local file to the FTP server.

    put local-filename [ remote-filename ]

    Download a file from the FTP server to the local device.

    get remote-filename [ local-filename ]

    Display the current directory on the FTP server.

    pwd

    Change the current directory on the FTP server.

    cd pathname

    Create a directory on the FTP server.

    NOTE:
    • The directory name can contain letters and digits, but not special characters, such as angle brackets (< >), question mark (?), backslash (\), or colon (:).

    • If you run the mkdir abc command, directory abc is created in the root directory.

    mkdir remote-directory

    Delete a directory from the FTP server.

    rmdir remote-directory

    Display or change the current directory on the FTP client.

    lcd [local-directory ]

    Display the specified directory or file on the FTP server.

    ls [ remote-filename ] [ local-filename ]

    Display details on a directory or a file on the FTP server.

    dir [ remote-filename ] [ local-filename ]

    Delete a file from the FTP server.

    delete remote-filename

    Change the login account and log in again.

    user user-name [ password ]

    Close the connection with the FTP server, but stay in the FTP view.

    close

    Close the connection with the FTP server and return to the user view.

    bye or quit

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >