Home
|
Helpdesk
|
Product Help
|
FTP
|
FTP
|
General Help
The text version of this document is available from:
This document introduces ftp and discusses software required to perform it. It also covers general ftp usage and common problems. Please read
for the specific details of ftp to and from Demon's servers.
Introduction
FTP stands for File Transfer Protocol. FTP is basically a tool (named after the protocol) used for transferring and handling files across the Internet.
For instance, if you wanted a to get the latest copy of Demon's welcome.txt document you could do so by "ftp-ing" the file from the machine known as ftp.demon.co.uk, our "FTP server". Retrieving a file in this way is known as "downloading" it.
Our FTP server is publicly accessible, commonly referred to as an "anonymous FTP server". The majority of FTP sites you will come across will be such servers allowing public download access to software, documents, databases and other useful resources. Some of these servers will also allow you to place a file on them, known as uploading. In most cases you will only have access to certain directories (folders).
On some servers, such as our World Wide Web Servers, you need to supply a valid login name and password to gain access to the machine by FTP. Again your access to the files and directories there will be restricted. This is to prevent the files on the server being altered or deleted by other users (and members of the public).
FTP Client software
| |
This is a package specially written to be an FTP client, examples on some common platforms are:
|
| |
Windows - WS-FTP, CuteFTP Macintosh - Fetch, Anarchie Amiga - GUI-FTP
|
FTP Command Line software
| |
This is just a command line in a terminal session or at a prompt invoked by typing the command "ftp", for example:
|
| |
Windows95 (with Dial Up Networking) - from the MS-DOS prompt DOS and other platforms - in KA9Q-based software Networks (especially Unix) - from a terminal session
|
A Web browser
| |
In practice this is any Web browser for FTP downloads. Some browsers can also perform limited FTP uploads, Netscape version 2 and above, for example.
|
|
Back to top
Generic ftp
Generic ftp via FTP Client software
- Connect to the Internet in your usual way. You must be connected to perform ftp.
- Start your FTP Client software See the "Required Software" section above for some examples of this type of software.
- Complete the session setup -Most FTP Client software has a "session" or "host" profile or other setup to be completed before connection. This will probably only need to be performed once, as it is usually retained between connections if you save it. The sort of details required will be:
- Session/Profile Name - This is just the name that will be associated with connecting to this particular FTP server (in menus or on icons etc).
- Host Name - The FTP server host or machine name.
- Host Type - This should be set to Unix for all of Demon's servers. You may need to choose Auto or a specific type for others. Check the site's details.
- Login Name, Username or User ID - This may be a name set up for your use on the server, depending on the type of server you are accessing. It may just be "anonymous" if you are accessing a public download site. See the "Anonymous Download" details later on in this document for details.
- Password - This is the password set up for you and also depends on the type of server you are accessing. It is simply your email address for anonymous ftp.
- Remote (Initial) Directory - It is usually best to leave this blank.
- Local (Initial) Directory - You may like to set this to a specific location on your hard disk, e.g. a "download" directory, or a "mirror" of your web site.
- Connect to the server - This is simple in FTP Client software, just hit the "Connect" button. If all goes well, you will usually see a welcome message or at least a directory listing for the server. If you get an error message returned, or are thrown out with "bad password", check the session details have been entered correctly and try again. Please read any messages returned by the server for up-to-the minute status info and problem reports. Continue only when successfully connected.
- Choose the directory - You should see a list of directories (folders) below your current directory if there are any. Simply Change Directory using your "ChgDir" or "cd" button, or by double-clicking. For instance to get to the directory "/pub/dir1/dir2" you just need to double-click on 'pub', if you have not already been placed there, then 'dir1' and 'dir2'. If appropriate, do the same to specify the local directory (for instance if you have a split-screen showing your local directories and the remote server's directories, as in WS-FTP).
- Choose the transfer mode - Choose the transfer mode that is appropriate to the type of file you are about to retrieve or send. (See "Transfer Modes" below).
- Transfer the files - This is usually simply a matter of highlighting the files you want to transfer and clicking on the "Copy" button to transfer them to your hard disk from the server, or vice versa. In WS-FTP you have "->" and "<-" buttons to transfer in either direction. Depending on the server you are accessing you may be able to transfer folders ordirectories, or perform other file/directory operations. Some FTP software supports drag-and-drop.
- Disconnect - Simply disconnect from the server by quitting or closing the software, or by hitting the Exit button.
For details of specific ftp operations to and from our servers please read the relevant section in:
Generic ftp via a Web browser
Many browsers do not allow uploads. Most are configured for anonymous download by default.
*WARNING* If you are making an FTP connection to a server you have you own login name and password for, bear in mind that both will be visible in the "Location" or "Address" field of your browser and may be retained in a list.
Many browsers do not allow uploads. Most are configured for anonymous download by default.
- Connect to the Internet in your usual way, You must be connected to start your Web browser. You could allow the browser to start loading its "home" page to confirm connection.
- Connect to the server:
In the "Location", "Address" or "URL" field of the browser enter: ftp://(ftp-server)/ - where "ftp-server" is the FTP server address. For example 'ftp://ftp.demon.co.uk/' for an anonymous download connection to our FTP server. If instead you have to enter a login name and password, enter: ftp://(login):(password)@(ftp-server)/
- Choose the directory
You should see a list of directories (folders) below your current directory if there are any there. Simply change to the relevant directory by clicking on it. For instance to get to the directory "/pub/dir1/dir2" you just need to click on 'pub' (if you have not already been placed there), then 'dir1' and then 'dir2'.
- Transfer the files
For download, this is simply a matter of clicking on the files you want to transfer one by one. You will usually be prompted to choose where the files will be placed on your local machine. Your browser will deal with the file types it recognises, for instance .gif files may be displayed as images. The transfer mode is not configurable via a browser and defaults to whatever the browser chooses for that MIME or file type. In most browsers you can force a file to download rather than be displayed - just click with your right-hand mouse button (PC) or click and hold (Mac), then choose to save the file. For upload (in Netscape 2+) go to your File menu and choose "upload file". You will then be prompted to choose the file.
If you have the full URL for the file you wish to retrieve (often the case for hyperlinks from Web Pages) the file in the example could be obtained simply by entering 'ftp://(ftp-server)/pub/dir1/dir2/(filename)' or clicking on the link to that location.
Generic ftp via FTP Command Line software
- Connect to the Internet in your usual way
You must be connected to perform ftp.
- Open an FTP session
Just type 'ftp' at the prompt of your terminal screen. Windows95 users need to do this from the MS-DOS Prompt, KA9Q-variant users from the "net>" prompt, Unix users from the "$" or "%" prompt etc. You may need to click on an FTP icon or open a prompt box to allow you to start typing.
- Connect to the server
You now need to open an FTP connection to the server "host" or machine name. This is usually performed by typing 'open (ftp-server)' although it could be combined with the previous step by typing 'ftp (ftp-server)', e.g. 'ftp ftp.demon.co.uk'. You should see a welcome message if you have connected successfully. If you see "Unknown Host" or "Service not Available" and are returned to the "ftp" prompt, just check the details and type 'open (ftp-server)' to try again.
- Log in
At the 'Login:', 'User:', or 'Name:' prompt type the appropriate Login Name or User ID. This depends on the type of server you are accessing. See the relevant specific example below. You will then be prompted with 'Password:'. This also depends on the type of server you are accessing. You should see confirmation that you are logged in. If you see "Login failed" or "Login incorrect" and are returned to the prompt just type: 'user (login name)' to try again. Please read any messages returned by the server for up-to-the minute status info and problem reports. Continue only when successfully connected.
- Choose the directory
If you now type 'ls', you should see a list of directories (folders) below your current directory if there are any there. Press <CTRL>+S to interrupt the scrolling list if it is long. Simply change to the relevant directory using the "cd" command: For instance to get to the directory /pub/dir1/dir2 you just need to type 'cd /pub/dir1/dir2', or 'cd /pub' followed by 'cd dir1' followed by 'cd dir2'. If you need to, you can do the same to specify the local directory using the "lcd" command. For instance to change to your local "temp" directory you would type 'lcd temp'.
- Choose the transfer mode
Choose the transfer mode that is appropriate to the type of file you are about to retrieve or send. (See "Transfer Modes" below). To choose ASCII or Text transfer mode, type 'asc'. To choose Binary or Raw Data transfer mode, type 'bin'. You can also toggle an indicator of the file transfer progress on or off using the command 'hash' - it simply causes "#" symbols to accumulate on the screen.
- Transfer the files
When you are ready to transfer a file, type 'get (filename)' to get (filename) from the remote server, or 'put (filename)' to put the local file (filename) onto the server. To get multiple files you can use the 'mget' command. For example typing 'mget *.zip' would get all the .zip files in the current remote directory from the server. There a similar commands for multiple "put" and "delete". You can use the "prompt" command to toggle prompting between files on or off.
- Disconnect
You can disconnect from the server by typing 'quit' or 'bye'. (Note that you will have to close your Internet connection in the usual way if you want to be disconnected from the Internet).
Please read the 'FTP Commands' section at the end of this document for a more complete list of useful FTP commands.
Back to top
Anonymous download
For the specific details of ftp to and from our servers, please read
Generally, to retrieve files from an "anonymous" or public access FTP server you must:
- Connect to the Internet
- Connect to the FTP server
- Log in with a "login" or "user" name or id of "anonymous"
- Supply your email address as the password
- Locate the file
- Download the file
So if your email address is "myname@hostname.demon.co.uk", use that as your password. Most "anonymous" FTP servers will have a "pub" or "public" directory containing files for public download. Please check the "Common Problems" section later in this document if you experience any difficulties.
Back to top
Common FTP problems
Transfer Modes - Binary and ASCII
There are two main FTP transfer modes. These determine whether any translation is done between the source file on your local machine and destination file on the remote server. Which you should use depends on the type of files you are transferring:
- ASCII or Text
This is sometimes the default mode. Text-based files should be transferred in this way. Characters in the text files are translated to their equivalents on the server. These files include: - Plain or ASCII text (.asc, .txt) - NOT Word Processing files
- HTML (.shtml, .htm) - the language Web pages are written in
- Source code and scripts (.c, .cpp, .java, .bas, .sh, .pl, .bat ..)
- Binaries encoded using UUencode, BinHex, etc. (.uue, .hqx ...)
- Postscript (.ps, .eps, .ai)
- Other text-based Markup documents (VRML, SGML etc.)
- Any text or script files that the server is to interpret or display
- Binary or Raw Data
All non-text files should be transferred in this mode. The files are not translated and an "Image" of the original is transferred to the server. These file types include: - Archives e.g. Zip, Stuffit, Tar etc. (.zip, .gz, .z, .sit, .tar ..)
- Executables (.exe, .com, .bin ..)
- Java Applets (.class)
- Databases, Word Processing and almost all data files
- Graphics files (.jpg, .gif, .bmp, .tif, .iff, .xbm ..)
- RealAudio and other sound files (.ra, .au, .wav, .mid ..)
- Movies (.avi, .mov, .mpg ..)
- Multimedia files, e.g. Adobe Acrobat, Macromedia Shockwave etc.
If you set your software to "Automatic" choice of transfer mode and encounter problems, check that this setting defaults to text mode for text files and binary/raw data for non-text. You may also need to ensure that the software is aware of which file type relates to which file "extension" on your system.
Back to top
Notes:
- Binary mode should be used for files already formatted for the destination Operating System (even if they are text), for example: PC-based documents for download to other PCs, MacBinary .bin files which are destined for to be opened on another Mac, Unix formatted text files uploaded to a Unix server, etc.
- It is fine for pure HTML files to be transferred to a Web Server as binary. However, plain text files may have extra characters inserted at the end of each line if they are transferred in binary mode.
- Transferring text-based files in ASCII or text mode to Demon's our servers will automatically convert them to the format required for the servers to be able to read and interpret them.
- Using the ASCII transfer mode on a Binary file will often make the transferred version useless.
Hint:
If you are unsure which mode to select for a particular file, try binary. you may also be able to find what type a file is by opening it in a simple text editor. If it looks a mess of random, unformatted strange characters, it is likely to be a binary file!
Finding files
If you are looking for a file and do not know it's name the most powerful way to find it is usually through a Search Engine on the World Wide Web, such as http://www.yahoo.com/. These sites can usually find a homepage, reference or link to it by a key word search.
If you know the file's actual name (e.g. "xyz32v2.zip") but not where it is located you can use an Archie search to find it. Please see
for more details on Archie, or email support@demon.net with the Subject "send welcome".
If you know which server a file is on but not where it is on that server, connect to it and read the documentation provided. There will often be descriptive files called "INDEX" or "README" describing how the files there are sorted and how to use the site. It is often easiest to browse a site via a Web browser.
Often a full list of the site (probably called "ls-lR" or something similar) will be available for when you need to find exactly where a file has been hidden. However before downloading the list, note that such files are usually *very* large (several MB even after being compressed), so its usually best to search using another method first.
Navigation difficulties
If you are having problems moving around the directory structure of a server, bear in mind that you may only be able to access files and directories at and below your particular directory on a Web Server, or the "/pub" directory on an anonymous FTP server.
Check that you are using "/" rather than "\" on Unix servers. i.e. 'cd /pub/dir1/dir2' rather than 'cd \pub\dir1\dir2'. Bear in mind that on most servers file and directory names are case sensitive, i.e. "/pub" is not the same as "/PUB". If you still have problems, navigate to your destination directory in a stepwise manner, i.e. 'cd /pub', 'cd dir1', 'cd dir2' etc. and read any messages that are displayed.
Back to top
Filename problems
These usually appear during downloads when your FTP software is unable to create the local copy of a file because your operating system doesn't allow the name. For example, "illegal:name.zip" is not permitted on MS-DOS or Windows 3.x systems because it doesn't fit the "8.3" all-CAPITALS filename convention. Also "illegal:name.zip" would be disallowed even on Windows 95 (because of the ":" character). Luckily the FTP 'get' command can take a second argument which is the target file name, so you could type the following in FTP Command Line software:
get illegal:name.zip illegaln.zip
to use the local file name "illegaln.zip" instead.
Some FTP Client software will attempt to translate such names automatically.
NB. Difficulties may persist if the file is an archive containing similar unpermitted filenames (which cannot then be un-archived).
Avoid using 16-bit Windows 3.x FTP software on the 32-bit Windows 95 system - the former will usually attempt to translate long filenames, whereas the latter can usually handle them without translation.
The incompatible filename problem is especially common in transferring HTML files. Such files do not link to each other correctly unless their filenames match those used in the links. Try to ensure that you use filenames consistent with the most "fussy" system you are going to store or use them on (commonly Windows 3.x or MS-DOS "8.3" filename systems). Consult the relevant documentation for your Web Server if you have problems.
Special care must be taken with such uploads from Windows95. Basically, Windows95 Explorer displays filename capitalisation inaccurately for short "8.3" filenames. Make sure you are aware of the actual long filenames involved by getting a "dir" listing in an MS-DOS prompt window.
Back to top
Compressed and Archived files
Many files are compressed to make them smaller and to make file transfer faster. Such archives should be transferred in binary mode, and then a decompression or un-archiving tool must be used to extract the files. The following is an overview of the tools needed for some common archive types:
- use PKUnzip, Stuffit or Unzip to unzip filename.zip
- use Stuffit to extract filename.sit (usually files from a Mac)
- use Uncompress to uncompress filename.Z
- use Tar to un-archive filename.tar
- use GZip (the GNU compression tool) for filename.z
Most other archivers have the same name as the extension used on the filenames they create, e.g. .arj, .lha, .rar. If you have one you can't identify please read the FAQ from the Usenet news group comp.compression, which is also available at
Utilities for uncompressing are available on ftp://ftp.demon.co.uk/. Look for PC-based archiving tools in the INDEX file at:
Macintosh-based decoding and archiving tools are available at:
Amiga-based archiving files are available at:
Unix-based archiving tools are available under the appropriate Unix flavour directories (usually called "tools") at:
Corrupt downloads
Usually this will occur when you have downloaded a file in ASCII mode rather than Binary, or vice versa. Choose the correct transfer mode (see Transfer Modes above) and try the download again.
Occasionally the file will have been interrupted during download or will be an incomplete copy. Check whether the file size reported for the local and remote files are the same. If not, check that you are using the correct transfer mode, read any output messages or logs for reported errors and try again. Some software (such as WS-FTP) will allow you to restart from the point at which the FTP was cut off.
No reverse DNS
Occasionally new users will not be allowed access to ftp.demon.co.uk or other FTP servers. It is possible that your login will be rejected because of a reverse DNS lookup failure. Don't worry about this if you have just joined us - your details are just waiting to be updated on our name servers, usually within one day.
"Server Returned Extended Information" message (MS Internet Explorer)
This error message simply means the Microsoft Internet Explorer's FTP client is not able to fully interpret the results of the last action. The solution is to use some other FTP software.
Back to top
FTP Commands
Here is list of some FTP commands you may find useful. They should be accessible directly from the prompt in FTP Command Line software or through similarly named menu options or buttons in FTP Client software. Their implementation may differ on different systems.
Basic commands
ftp [servername]
|
start session in FTP Command Line software and open a connection to remote FTP server "servername"
|
open [servername]
|
OPEN an FTP connection to "servername"
|
close
|
CLOSE the current FTP connection without ending the FTP session. You can just 'open' a new connection.
|
cd dirname
|
Change current remote Directory to "dirname"
|
lcd [dirname]
|
Local 'cd' (to new local directory "dirname")
|
ls
|
briefly LiSt contents of remote working directory (Use the 'CONTROL+S' key-combination to prevent lists scrolling)
|
asc (or 'ascii')
|
select ASCII or text transfer mode
|
bin (or 'binary')
|
select BINary or raw data transfer mode
|
get file1
|
GET the remote file "file1"
|
put file1
|
PUT the local file "file1" onto the remote server
|
del file1
|
DELete the remote file, "file1" (Use the 'CONTROL+C' key-combination to abort a transfer)
|
quit (or 'bye')
|
Close the connection and QUIT the FTP session
|
Additional commands
user [myname]
|
Set your USER or login name (to "myname") without having to CLOSE the connection.
|
pwd
|
Print current Working Directory (on remote server)
|
cd /
|
Change Directory to remote root directory
|
cd ..
|
Change current remote Directory "back up" one level
|
!
|
"Shell" back to the command prompt
(Use '!' for performing file operations on the local system without closing the FTP connection. Usually you just type 'exit' to get back to the ftp prompt.)
|
ls -C
|
display remote directory list in Columns (compact)
|
ls -l (or 'dir')
|
give Long directory listing of the remote directory
|
ls -alR biglist
|
store a Long Recursive file list of All remote directories at and below the current one in the local file "biglist". NB This file could be huge!
|
hash
|
toggle # HASH-mark transfer progress display on/off
|
get file1 -
|
GET the remote file "file1" and display it
|
get file1 file2
|
GET the remote file "file1", save as local "file2"
|
put file1 file2
|
PUT the local file "file1" onto server as "file2"
|
prompt
|
toggle PROMPTing between multiple files on/off
|
mget file1 file2
|
perform Multiple GETs for remote "file1", "file2"
|
mput file1 file2
|
perform a Multiple PUT of local "file1", "file2"
|
mdel file1 file2
|
perform Multiple DELetes of remote "file1", "file2"
|
mget *
|
Multiple GET all files in the remote directory
(Similarly 'mput *', 'mdel *', 'mput *.txt' etc.)
|
mkdir dirname
|
MaKe DIRectory "dirname" on the remote server
|
rmdir dirname
|
ReMove (empty) DIRectory "dirname" from the server
|
ren name1 name2
|
REName remote file or directory "name1" to "name2"
|
help
|
Display list of FTP commands from your software
|
help commandname
|
Display help about "commandname"
|
remotehelp
|
Display basic FTP commands understood by the server
|
quote
|
QUOTE a basic FTP command directly to the server
|
Accurate at the time of writing (01/1997) E&OE
You can receive the latest Demon announcements by subscribing to the announce mailing list: Send an email to majordomo@demon.net with "subscribe announce" in the body of the message.