Page 1 of 1

Setting Up VSFTPD FTP server for linux noobies Rate Topic: -----

#1 max302   User is offline

  • Proud supporter of the lulz
  • member icon

Reputation: 3
  • View blog
  • Posts: 1,281
  • Joined: 05-March 06

Posted 17 September 2006 - 01:49 PM

As seen on

I hate text mode, or at least, I hated it in the past. As a person who grew up in the flourishing era where Windows 95 and 98 ruled the world, I was very introduced very young to setup utilities with a graphic user interface. This brainwash, combined with my dad’s repeated warnings (”Don’t touch the MS-DOS!”), I feared DOS like it was satan. Now, things are different, as I manipulate basic unix with ease and have the potential for learning DOS, but still, text kinda gives me the willies. So when I see stuff like this for tutorials:

	[[email protected] tmp]# chown root:ftp-users /home/ftp-docs/*
	[[email protected] tmp]# chmod 740 /home/ftp-docs/*
	[[email protected] tmp]# groupadd ftp-users
	[[email protected] tmp]# mkdir /home/ftp-docs/

I simply break to tears. You either know linux or you don’t, and if your in a hurry for an FTP server and you don’t know linux, this tutorial is for you. On the menu: Graphic mode configuration and setup, all the way! Considering that you have the proper packages installed of course. With this said, here is my tutorial.

What is VSFTP?

VSFTPD stands for Very Secure File Transfer Protocol Daemon. To make a long story short, it is a service that accepts incoming transmissions that use the FTP protocol. FTP , on it’s part, is specially designed to transfer files from one computer to the other. VSFTPD is installed on most linux distros and because of it’s level of security and ease of configuration and deployment, but if your distro doesn’t come with the daemon, you can download it from here. I’ll be focusing this tutorial for Red Hat distros, which includes the latest of original Red Hat and Fedora Core 1 through 5. It might also work with Entreprise, but I have never seen Entreprise so I can’t tell.

Step 1: Installing the Daemon

Skip this if you already have it installed, obviously. If you don’t yourself mentally for the bit of terminal work coming up. No,really, just a tiny bit, I promise. The steps to this can be found in the INSTALL.txt file of the archive that you have just downloaded but we’ll go through them anyways, assuming that you are a total linux noob.

1.1: Unzip the package that you just have downloaded. This is easily done with a graphic app, but you can also use the following shell commands to extract also:

	cd yourdir
	gzip -f youfile.ext

You may extract it anywhere, I reccomend you home folder, so that you can find it easily afterwards.

1.2: CD (change directory) to the folder where the VSFTPD setup files are. You commands would look like this:

	cd /home/user/vsftpd/

1.3: Your are now in the directory and can execute any file found in the latter. The command for execute is ./ followed by the program or script name. Since the first step in a from-source install is to configure the install for your rig, we would execute the file called “configure”. The command would then be “./configure”. Once you have typed this in you console, stuff will begin to appear, stuff that you generally dont need to read. Let the script do what it has to do.

1.4: Once the install is configured, you may now “make” the install. Type in “make install”, and the program should now install by itself. Some more stuff will print in your console, and again, unless you now how GCC works, you shouldn’t have to worry about it.

When this finishes, the daemon is installed and is ready to be configured and run.

Step 2: Editing the .config file

This is the longest but easiest part. The configuration file can be found at “/etc/vsftpd/vsftpd.conf”, and all you need to do is to read the file with a text file editor like gedit and edit it for what fits you best. The whole thing is pretty self explanatory and really well commented, so I won’t waste my time describing every line of it once more. A comprehensive eplanation of all the VSFTPD options can be found here. If you are having trouble, any Linux-oriented IRC chat room is pretty sure to have instant answers to your questions. Once the config file is edited to your taste, save and exit.

Step 3: Creating the FTP User(s)

How the user system in VSFTPD works is that it uses local users names and passwords to authenticate clients. When I was setting up my FTP server for the first time, I was desperatly looking for a users.conf file somewhere, and it was nowhere to be found, so don’t do as I did. To add an FTP user, simply create a new user with either the User management tool on your linux system or the console. The console way to do this works like this.

	useradd yourftpuser
	passwd yourftpuser

Upon entering the passwd command, you will be prompted for the password for this user twice. If you do not want to set any password for that user, which is not reccomended for security purposes. Once your user is created, you may go and log into your ftp server with this user.

Now if your the kind of person who uses only root to login, don`t try to login with root to your FTP server. For security reasons, it just won’t work. By default, all the users found in the /etc/vsftpd.user_list file will not be authorized to connect to the server. If you absolutely want to connect with root, remove root from that list, and you’ll be okay.

Step 4: Start the Daemon

Now the only thing to do in order to get a working FTP server is to start the service. If you have Red Hat Server Configuration Tools installed, simply go to Menu -> System Settings -> Server Settings -> Services. Scroll down the list to your left and check the box next to VSFTPD. Click on VSFTPD and click the Start button. From the console, type this:

/etc/init.d/vsftpd start

Voila! Your server is now locked and loaded and ready for action.

Well almost. If you have either a hardware or software firewall, you MUST configure your router/switch or firewall to accept incoming FTP transmissions on port 22. If you are having trouble with port forwarding on your router, has port forwarding instructions for any service on almost any router.

This concludes my tutorial. For any comment, suggestion, correction, flaming, or whatever else, just leave a comment or e-mail me.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1