ECN No Name Newsletter: Winter, 1998

The ECN No Name Newsletter is no longer being published. This is an archived issue.

[previous article] [next article]

HTTP Instead Of FTP

Kyler Laird, Systems Programmer/Analyst
kyler@purdue.edu

For many years, Engineering faculty have made data available to the public through "anonymous FTP sites". Some have even used FTP to allow collegues to upload information to Purdue hosts. While FTP is a familiar tool to these users, it is fraught with problems; it usually requires administrative effort to establish. Some users find it difficult to use.

There is an alternative to FTP. ECN's HTTP servers can be used to download and upload data. All a user needs is a URL and a suitable Web browser. Any ECN user can immediately make data available through the HTTP server with trivial effort. Allowing uploads is a little more difficult, but still possible.

If you already have a directory of data available through FTP, you can make it available through HTTP by making a symbolic link to the directory in your public-web directory. For example, if you have data in


     /foo/blah/FTPstuff/
you could make the data available by HTTP using the command ln -s /foo/blah/FTPstuff ~/public-web/FTPstuff. If everything else is setup correctly, you should then be able to access this directory using a URL such as
     http://www.ecn.purdue.edu/~yourPHalias/FTPstuff/

One advantage of using HTTP instead of FTP is that the server will send the "content type" of the data to the client. If you provide something besides plain or HTML text, you'll probably want to tell the server what type it is. For example, if all of your files ending in ".doc" are RTF text, add the following to ~/public-web/.htaccess:

	AddType text/x-rtf .doc
If the browser is set to handle "text/x-rtf", it will invoke the desired helper application after downloading your data file.

Allowing uploads of data is a little trickier. We have a simple upload CGI script at http://www.ecn.purdue.edu/ECN/tools/upload. By using this script, you will be able to allow anyone or only select users to copy data files to your directory.


webmaster@ecn.purdue.edu
Last modified: Monday, 23-Feb-98 14:53:45 EST

[HTML Check] HTML