// Deprecation of FTP

File Transfer Protocol (FTP) has been around for many generations and has been used successfully for transferring files via FTP clients and numerous scripting languages. However, FTP is also considered a security risk by many cybersecurity experts.

NASA’s Goddard Space Flight Center will be blocking all requests to public facing FTP servers—including NCCS Dataportal FTP clients as of 20 April 2018.

// Alternative methods for downloading data

Downloading via HTTP

Hypertext Transfer Protocol (HTTP) is the protocol that drives most web site internet traffic today. A variant of the protocol, called “HTTPS”, “S” for “Secure”, has been chosen to replace FTP.

HTTPS encrypts all transactions between client and server. This makes it extremely difficult for third parties to intercept what is being transferred.

HTTPS downloads will not require an active login. HTTPS downloads can be found at https://portal.nccs.nasa.gov/datashare/ .

Downloading via wget

wget is an open source utility that can download entire directories of files with just one command. The only path that is required is the root directory. wget will automatically traverse the directory and download any files it locates.

wget is free and available for Linux, macOS, and Windows.

Installating wget

Linux

  1. Launch a command-line terminal
  2. $ yum install wget -y

Mac

  1. Install https://brew.sh/ (admin privileges required)
  2. Launch Terminal
  3. $ brew install wget

Windows

  1. Download the latest 32-bit or 64-bit binary (.exe) for your system https://eternallybored.org/misc/wget/
  2. Move it to C:\Windows\System32 (admin privileges will be required)
  3. Launch cmd
  4. In the Windows Command Prompt, type > wget -h to verify the binary is being executed successfully
  5. If any errors appear, the wget.exe binary may be not be located in correct directory or you may need to switch from 32-bit 64-bit

Command-Line/Terminal Usage:

$ wget -r -np -nd -R "index.html*" “https://portal.nccs.nasa.gov/datashare/PATH_TO_DATA_DIRECTORY” -P TARGET_DIRECTORY_ON_YOUR_FILE_SYSTEM

Be sure to replace the following:

  • PATH_TO_DATA_DIRECTORY: location of source directory on datashare site

  • TARGET_DIRECTORY_ON_YOUR_FILE_SYSTEM: Where you would like to download the files. Examples include /Users/jdoe/data for macOS and Linux or C:\Users\jdoe\data for Windows

Using wget to list directory files

This example uses the wget command to make a request for the file listings in a specific directory on our web server at the URL https://portal.nccs.nasa.gov/datashare/PATH_TO_MY_FILE

$ wget -qO- https://portal.nccs.nasa.gov/datashare/PATH_TO_DATA_DIRECTORY/ | sed -e 's/]*>//g;s/^ //g'

Using curl to download

This example uses the curl command to make a request for the file on our web server.

$ curl https://portal.nccs.nasa.gov/datashare/PATH_TO_MY_FILE -o /Users/jdoe/Desktop/file.ext

Be sure to replace the following:

  • PATH_TO_DATA_DIRECTORY: location of source directory on datashare site

  • TARGET_DIRECTORY_ON_YOUR_FILE_SYSTEM: Where you would like to download the files. Examples include /Users/jdoe/data for macOS and Linux or C:\Users\jdoe\data for Windows

  • The “-o” flag may not be applicable to Windows systems, the option species a location to save the file on the local system.