FTP and Beyond NASA
Total Page:16
File Type:pdf, Size:1020Kb
LINUX USER GFTP File Transfer with the Versatile GFTP FTP and Beyond NASA Whether you like your file transfers with a GUI or from a command prompt, GFTP has the right tool for every job.The GFTP client also supports advanced features such as secure file transfer with SSH. BY MARTIN STEIGERWALD FTP is a versatile and efficient installed automatically. See the box area shows the current action for a pro- File Transfer Protocol (FTP) labeled “Installing GFTP” for more on tocol. Gclient for Linux systems. GFTP, installing GFTP with Suse or Debian, as Enter the name of the FTP server to which was written by Brian Masney, per- well as details for building GFTP from which you wish to connect in the box forms all the standard chores associated source code. labeled Host at the top of the main win- with downloading and uploading files to dow. You can also enter an FTP FTP servers, and it also offers additional Working with GFTP username and password, and you can services, such as HTTP file transfer, SSH- GFTP launches a classical FTP-style split specify the port number to use for the based file transfer, and simultaneous window, with panels showing the local connection. The split window displays download from multiple servers. The and remote directories (see Figure 1). A the local directory structure on the left GFTP program provides several useful status area below provides information and the remote directories on the right. features that add efficiency to your FTP on the current transfers, and another When you find the file you wish to trans- sessions, such as drag and drop, intelli- gent prompting for existing files, direct Installing GFTP input for FTP commands, and direct If you have Suse Linux,you can run YaST | also means that the menu items created by transfer between two FTP servers. Install and remove software to install the your package management system will GFTP comes in two flavors: the gftp package. SuSE Linux 9.1 has Version point to your customized version. If you gftp-gtk variant supports convenient 2.0.16-44. need to remove your own version,because GUI-based file transfers, whereas gftp- If you prefer to build the software yourself, Suse has introduced a new package,for text is a text-based FTP client used with you will need to install a few tools and devel- example,you can enter su -c “make unin- the shell. If you type gftp, your system oper files before you start. For example,in stall” to do so. may launch either the X11 version or the Suse,make sure you install the YaST C/C++ On Debian Linux,you can enter su -c “apt-get text version, depending on how your Compiler and Tools and Gnome Development install gftp” or opt for a package manager system is configured. selections. such as Synaptic or KPackage to install GFTP; GFTP is available for several popular Download the GFTP source code archive we tested GFTP with Debian Sarge version Linux systems, although it is not always from the project homepage [1],and unpack 2.0.17-5 .The gftp package automatically the package by typing tar -xjf gftp- installs both versions of GFTP,although you What about FTPS? 2.0.17.tar.bz2,or use desktop tools to unpack can install the individual packages,gftp-gtk the tar archive. Change to the gftp-2.0.17 and gftp-text separately if you prefer. FTPS is an SSL-protected variant of FTP.GFTP directory,and follow the usual steps:./con- The packaged version for Debian does not supports the FTPS protocol for encrypting figure ; make ; su -c; make install. provide SSL support at present (see [2]). If the control connection: the program trans- By default,make install places the exe- you intend to use FTPS or HTTPS,compile the mits FTP commands with parameters such cutable GFTP files in /usr/local/bin.This puts software as described previously.But don’t as the password as cipher text but does not your custom-built version higher up the forget to install the libssl-dev package with encrypt files. search path than the regular install,and this the OpenSSL developer files before you do. 76 February 2005 www.linux-magazine.com GFTP LINUX USER Figure 1:The GFTP main window provides a familiar FTP GUI for uploading Figure 4:The best of both worlds: GFTP lets you use the mouse to navigate and downloading files. the target directory and then type a text-style FTP command. fer, select the file and click the appropri- command into the GFTP main window file from one FTP server to another with- ate arrow button. (The arrow buttons are (see Figure 4). out ever storing the file on the GFTP located between the local and remote If you wish to select multiple files from client computer. GFTP’s direct transfer sides of the main window – see Figure 1. multiple directories to transfer all at option requires that both servers support To transfer a file from the local to the once, you need to disable Start transfer the File Exchange Protocol (FXP), an remote directory, click the arrow point- to stop GFTP from running off and fetch- extension of FTP. To launch a direct ing right. To transfer a file from the ing the files. Then select the files you transfer session, connect to the FTP remote to the local directory, select the need, and re-enable the option to tell the server that will be receiving the files. arrow pointing left.) program to start the file transfer. Then select Local | Open URL… to con- GFTP attempts to resolve file naming GFTP’s support for downloads from nect to the FTP server that will be conflicts before the transfer begins. If a multiple services is excellent. Simply dis- sending the files. file with the same name already exists in connect from the current server and If you attempt to terminate a connec- the target directory, GFTP asks you what connect to another server while the pro- tion while the program is establishing a to do with the file (see Figure 2). The gram carries on with the current connection or reading a directory, GFTP dialog allows you to specify an action for download operation in the background. displays a message in the view area individual files or for all files. The pro- If you select Do transfer one at a time, telling you to click on the Stop button gram supports overwriting and has a the FTP client will process the downloads first. If you do not notice the message, continue mode for interrupted transfers. one after the other. Otherwise, the pro- you might wonder why the program is By default, GFTP suggests continuing a gram simultaneously loads one file each not responding. file transfer. You can select Overwrite by from each server where you have initi- default in FTP | Options | General to ated a download. This only makes sense Configuring File Types change this behavior (see Figure 3). if you have a fast Internet connection. GFTP’s configuration file allows you to The setting in the Options | General GFTP also supports the direct transfer specify which programs to use to display tab labeled Allow command input in GUI of files between two FTP servers. In files of certain types. The program does enables FTP command input (see Figure other words, you can use FTP to move a not have a GUI-based configuration dia- 3). This setting gives users the option of log for this. Open the file .gftp/gftprc in using a GUI without losing the benefit of your home directory with your favorite direct command-line input. If this option editor (see Figure 5). Look for lines that is enabled, you can enter a text-style FTP start with ext= . Each line follows the same pattern, starting with ext=, then a dot and the file extension, the XPM image file to use, the transmission mode, B for binary and A for ASCII, and finally the name, and if needed, the path to the program for dis- playing or playing the file type. Common filetypes like widely spread image and music file formats as well as HTML doc- uments are predefined. Enter your favorite display program for these types. Figure 3:The General tab in the Options dialog It is easy to create a new file type by Figure 2: Resolving file name conflicts in GFTP. box controls the program’s general behavior. copying and modifying an existing line. www.linux-magazine.com February 2005 77 LINUX USER GFTP GFTP in the Shell If you intend to use SFTP If you need to transfer files for secure file transfers, you automatically using a script, might like to wait until ver- the shell variant of GFTP is a sion 2.0.18 of GFTP is better option. Typing help released. The current CVS gives you an overview of the snapshot for GFTP already commands supported by the resolves this problem, says GFTP shell version. You can the program’s author. And type help commandname for there are bugfixes for other more detail on a specific com- problems, whereas the cur- mand. rent version of GFTP simply You can type a command has workarounds in the FAQ such as gftp -d ftp://youruser- [3]. For example, you no name:yourpassword@your- longer need to specify the domain.com/directory-with- Figure 5:The configuration file allows you to map applications to file types. path to the SFTP server. SFTP html-files to store the data for should work without any your web hosting account, additional configuration.