G LU G | National Institute of Technology Hamirpur

What is FTP?

FTP stands for File Transfer Protocol.It is a protocol widely used for transferring files over any network that supports the TCP/IP protocol suite. There are two computers involved in an FTP transfer: a server and a client. The FTP server, running FTP server software, listens on the network for connection requests from other computers. The client computer, running FTP client software, initiates a connection to the server. Once connected, the client can do a number of file manipulation operations such as uploading files to the server, download files from the server, rename or delete files on the server and so on.

The FTP protocol is described in RFC959.

»»Read RFC959

RFC

In internetworking and computer network engineering, Request for Comments (RFC) documents are a series of memoranda encompassing new research, innovations, and methodologies applicable to Internet technologies.

»»Read more

Announcements

We are in the process of enriching our bulletin board and tutorial sections. So anyone interested in writing a tutorial, a review, or sharing interesting links, can just type them down and mail copies to Debarshi ( [email protected] ) and me ( [email protected] ), and we will take care of the rest. Make sure you include the text (plain text only), relevant screenshots and other stuff as seperate attachments.

Posted by Arjun Shankar at 14:08 hr 01/04/2006.

vsftpd: Short n Sweet

We use vsftpd for hosting our ftp server, and it only makes sense that there should be a tutorial for this too.. Though I had talked about ProFTPD before, this one is simpler, easier, and faster, with the disadvantage of having lesser choice in configuring things.

Quickly getting down to business, synaptic/apt/yum cultists get vsftpd from your repository. Others install from source, unless ofcourse, it is already there, and fire up a nice text editor as root. Open the config file. The one for a default RHEL install (which is what GLUG uses, by the way) is at /etc/vsftpd/vsftpd.conf. Check your man page for where yours should be.

Now check out the config file, it is more or less going to be like this: vsftpd.conf . If its blank, copy mine in.

Notice that local_enable is set to NO. So that only anonymous access is allowed. write_enable is also set to NO (for obvious reasons ;)). Most of the opions are self explanatory. You can set ftpd_banner to some nice text you want to show on login.

Now the last three lines in my config file. "no_anon_password=YES", this means that anonymous users (like a browser) wont be asked for a password. It doesn't matter right? "listen=YES" makes sure that the server runs as standalone (and not through inetd or xinetd), this is preferable for performance reasons (someone told me this, not sure myself). I have set "anon_root" to the directory that I want to allow FTP access to, for the anonymous users (who also happen to be the only kind of users for our server).

There are options to limit download speeds (cant let them have all of your resources can you? :)) Check out the man page. It talks about these also.

Thats it! Save the file, RHEL/Fedora users hit these lines in a terminal as root:
--------------------------------------------------------------------------------------------------------
service vsftpd start
chkconfig vsftp on
--------------------------------------------------------------------------------------------------------

Others do the equivalent, to make sure your service starts, and starts each time you boot.

Enjoy!

Our vsftpd server, as seen from a browser.

Posted by Arjun Shankar at 14:00 hr 10/04/2006.