The best advice, for those wanting to upload files by FTP, is to install a proper FTP package on your computer. However, you might occasionally find yourself needing to use your browser for FTP, or you may want to ask someone to upload files using their browser, and this could cause you some problems because web browsers do not do FTP very well.
In theory, you ought to be able to just type an FTP URL, e.g. ftp://bcra.org.uk and have the browser sort out the connection for you, prompting for user name and password. But in practice, that does not always work.
This posting is not an FTP tutorial, so Im not going to explain all the tedious settings you have to check in Internet Explorer. Instead, my purpose is to point out a strange "behaviour" (i.e. not actually a "bug") on the BCA server that you might not notice elsewhere, and to make a suggestion for how to FTP to the BCA web server.
Firstly, the problem: discounting the fact that some browsers may operate in a "read only" fashion (and not let you upload or create folders) and some browsers might require arcane settings to be made (i.e. Internet Explorer) there is a particular problem when using web browsers with the BCA FTP site (and some, but not all other FTP sites). The symptom of the problem is an obscure error message. Internet Explorer may just report that the site is unavailable. Firefox might say 421 Can't change directory to /var/ftp/ and Chrome might say Error 324 net::ERR_EMPTY_RESPONSE): Unknown error or Error 101 (net::ERR_CONNECTION_RESET): Unknown error. These are all symptoms of the same problem, which is caused by two circumstances, namely...
1) The FTP site has been set up to disallow anonymous logins, and
2) Your browser has been configured to try an anonymous login before attempting a password login.
What happens (it appears, after some testing) is that your browser sends a blank USER command to the FTP site and the site responds saying "well f*** off then". The reason your browser does this - even though you had no intention of logging on anonymously - is that it is (allegedly; according to some of the Internet community) part of the specification for the behaviour of web clients that they should attempt an anonymous login before doing a signed login.
An FTP site that does accept an anonymous login accepts the blank USER command, at which point it waits for a password (which might be blank, of course). But, at this point, your browser probably decides to ask you how you want to log in and, if you give it a user name and password, it simply sends a fresh USER command to the FTP site which then abandons the anonymous login. (You can see that this sequence of events is daft and either the browser programmers or the FTP programmers, or both, have screwed up. The web forums are full of people moaning about this, and wishing that FTP sites would issue a more helpful message to these stupid browsers!)
The solution: If you are having this problem with the BCA server, there are a number of things you can try.
1) First of all, go to the Command Prompt in Windows and try a "manual" FTP command. Type ftp <your ftp site> and then type your user name and password in response to the prompts. After the site has logged you in, type quit to log out. If that all works then you know FTP is working, and it is just your browser that is causing the problem. In theory, you can use this command-line interface to send your files ... if you know what you are doing.
2) You can force Internet Explorer to do a signed login, but the process is tedious and I cannot remember it. It involves several arcane settings you need to specify and the details probably vary betwen browser versions. Someone might wish to post instructions ...?
3) You can use WinZip to FTP to the server. I didnt realise WinZip could do this, so thanks to Geoff Dommett for pointing it out. I have WinZip 14.5 Pro and it is dead simple - go to the File menu and select "send to...", and "FTP site", and follow the instructions.
4) You can download FireFTP, a free FTP package for Firefox.
To conclude, this strange FTP problem is caused by the twin circumstances of an FTP site that refuses an anonymous login (e.g. the BCA server) and a browser that insists on performing an anonymous login before trying a signed login. It highlights the fact that web browsers are not ideal for FTP
.
FTP uploads to the BCA web server: some guidance
- David Gibson
- DG test
- Posts: 622
- Joined: Thu 16 Mar 2006 23:45
- David Gibson
- DG test
- Posts: 622
- Joined: Thu 16 Mar 2006 23:45
Re: FTP uploads to the BCA web server: some guidance
OK. Here it is.David Gibson wrote:2) You can force Internet Explorer to do a signed login, but the process is tedious and I cannot remember it
This is how to FTP using the "inbuilt" Windows routines, when Internet Explorer itself doesnt work.
These instructions might not work for you, because Windows systems differ from version to version, and because different people can have their systems configured differently. But here goes...
First of all, open Internet Explorer, click on the Tools menu and select Internet Options. Next, click on the Advanced tab in the box that pops up, and scroll down to "Browsing". Scroll on down, and check the box next to the option "Enable FTP folder view (outside of Internet Explorer)". Click on OK.
Now you have done that, open Windows Explorer (sic: not Internet Explorer). You might have set this up (or it might have defaulted) to some minimalist options so click on the View menu, click Toolbars, and check that the Address Bar is visible.
Now, type the FTP address into the address bar, e.g. ftp://ftp.bcra.org.uk. Because anonymous login is not allowed to this site, this will produce an error message in a pop-up box. Note, though, how much more USEFUL the error message is than in Internet Explorer. It actually tells you what the FTP dialogue is that failed. (OK, not of use to "you" perhaps, but useful to me)
Now youve done that, and failed to get access, you can do a signed login. In Windows Explorer (sic: not Internet Explorer) click on the File menu. It should now give you an option "Login as..." which will allow you to login to the FTP site whose address is in the address bar.
Tedious - but it works!
- David Gibson
- DG test
- Posts: 622
- Joined: Thu 16 Mar 2006 23:45
What Pre-FTPd has to say on the subject
BCA's FTP server is Pure-FTPd. I came across the following in the Pure-FTPd manual at http://download.pureftpd.org/pub/pure-ftpd/doc/FAQ so - were BCA wanting to fix this problem, here is an answer. (Although, as it says, "please note that IE (and browsers at large) are usually bad FTP clients."
Question: Internet Explorer doesn't show any login box.
Answer: IE does a very strange trick to detect whether an FTP server does accept anonymous connections or not. Basically, it connects to the server and logs in as 'anonymous'. But if you say 'no' at this point, it drops the connections with an error. You have to say 'ok, anonymous users are allowed' and then, when a dummy password ('IE@') is sent, you say 'ah ehm... finally... no... anonymous users aren't allowed' . Silly. To play that game, you must run pure-ftpd with the -E (non-anonymous server) and -b (compatibility with broken clients) flags. Then, the magic popup will show up. But please note that IE (and browsers at large) are usually bad FTP clients.
Question: Internet Explorer doesn't show any login box.
Answer: IE does a very strange trick to detect whether an FTP server does accept anonymous connections or not. Basically, it connects to the server and logs in as 'anonymous'. But if you say 'no' at this point, it drops the connections with an error. You have to say 'ok, anonymous users are allowed' and then, when a dummy password ('IE@') is sent, you say 'ah ehm... finally... no... anonymous users aren't allowed' . Silly. To play that game, you must run pure-ftpd with the -E (non-anonymous server) and -b (compatibility with broken clients) flags. Then, the magic popup will show up. But please note that IE (and browsers at large) are usually bad FTP clients.