Transferring files with gFTP

2239

Author: Chad Files

gFTP is a complete, easy-to-use file transfer tool for the Linux desktop. In spite of its name, gFTP can transfer files using more than standard File Transfer Protocol; it provides several features that make it more than just another FTP client.

The gFTP interface comprises three main sections: from top to bottom, a tool/connection bar, file transfer windows, and progress/log area. The connection bar, as its name suggests, is where you enter connection settings. All file management and transfer initiation takes place in the transfer windows. The progress/log area contains a pane that shows the transfer status of files and a scrolling log of all the actions in the current session.

When gFTP is launched, the transfer window on the left defaults to your home directory; the transfer window on the right is empty. To establish a connection with a remote host, fill in the settings in the connection bar and click the connect/disconnect button (the icon on the left of the connection bar). If the settings are correct, gFTP should connect to the host and display its filesystem in the right window. If you want to keep the host settings for future use, click Bookmarks > Add Bookmark; gFTP will add the settings, including the password if you tell it to, to its list of bookmarks.

Once you are connected, transferring files is as simple as selecting the ones you want and clicking the arrows between the transfer windows. You can also transfer single directories by dragging and dropping a directory into the opposite transfer window.

gFTP – click to enlarge

When a transfer has been started, gFTP will show a list of the files and their transfer progress in the progress pane. Several messages will also appear in the log explaining exactly what gFTP is doing. If you need to stop a transfer, skip a file, or reorder the files, right-click the progress pane and a list of options will appear; these options can also be found in the Transfers menu on the toolbar.

gFTP can also perform file management tasks on the local and remote systems, including creating new directories, changing permissions (chmod), changing directories, renaming files and directories, and viewing and editing files. The tasks can be found in the right-click menus of the transfer windows, and in the Local and Remote toolbar menus. These menus also include tools to select and filter files. “Change Filespec” will let you define a regular expression filter that causes the transfer window to show only matching files. The rest of the tools allow you to select sets of files in the window; “Show selected” filters out all files except the selected one, “Select All” selects all of the files and directories in the respective window, “Select Files” selects all of the files in the respective window, and “Deselect All” clears the selection. Every time one of these tasks is executed, a log message is added to the log at the bottom of the window.

Other transfer protocols

gFTP is not just for FTP; it handles several other transfer protocols:

HTTP/HTTPS (Hypertext Transfer Protocol) is the protocol that makes the Web work. gFTP allows you to connect to Web sites, browse, and download files. There are some limitations though; the gFTP HTTP transfer tools are designed for sites that utilize directory browsing. Sites that have default pages or have directory browsing disabled will appear to not have any files in the file transfer window. When using HTTP transfers, do not put http:// in front of the host address, and when connecting to a secure site you have to manually install the server’s SSL certificate (check your OpenSSL setting to find out how to do this).

SSH (Secure Shell) is a protocol used to securely connect to servers over a command shell. SSH transfers are useful in environments where FTP is not trusted or not available.

FSP (File Service Protocol) is a UDP (User Datagram Protocol) protocol for transferring files, and used mostly as a replacement for anonymous FTP.

Options and settings

gFTP has several settings and configuration options that you can access by opening the options dialog (FTP -> Options). In the dialog you’ll see several tabs:

  • General contains the basic settings for gFTP. Most of these settings are self-explanatory and do not need to be changed. The ones you should change are View program and Edit program, which control what program is run when you select the Edit and View options in the Local and Remote menus. gedit, the default GNOME text editor, is a good choice for both of these settings.
  • Network allows you to configure timeouts, retries, transfer rates, and other network-related settings.
  • FTP houses proxy, anonymous FTP, and transfer mode settings. Important settings on this tab include passive mode and ASCII transfer mode settings.
  • HTTP has proxy configuration options.
  • SSH allows you to set a custom program and settings to use when establishing SSH connections.
  • Local Hosts is where you can add custom network host and domain information.

Advanced tools

gFTP also has a handful of useful extra features, such as the ability to directly move files between two remote hosts. To do this, you have to connect to one host in the right-hand window, then change to the left window (FTP -> window 1 from the toolbar) and connect to another host. Once you’ve made the connections you can initiate transfers between the two hosts.

As mentioned earlier, gFTP will allow you to set an editor, and it lets you send files direct to the specified application by right-clicking on them. If you save any changes to a file you edit on a remote host, gFTP will automatically upload the changes. This feature is handy for making quick changes to configuration files.

Another advanced feature is the ability to compare two hosts. gFTP does this by selecting the files and folders that are different in the two transfer windows; difference is defined as exists or does not exist, not differences in individual files.

gFTP also includes a command-line interface, though many distributions include the command-line version as a separate package. For the most part the command-line version functions in the same way as the standard FTP utility; notable differences include the ability to use SSH transfers and download directories recursively. The gFTP Web site provides more information about the command-line interface.

gFTP also allows you to send site commands to a remote host. Site commands are FTP commands that are server-specific and not part of the FTP standard. You can send a site command by right-clicking on one of the transfer windows and selecting Send SITE Command. The same feature can also be found in the Local and Remote toolbar menus.

gFTP is a Linux file transfer Swiss Army knife — packed with features and very helpful. It’s an application that every Linux user should know about.

Chad Files, a software developer and writer, has been developing software applications for more than 10 years, and is a contributing developer to many open source projects. He has used gFTP nearly every day for the last five years.