Install FTP Server with vsftpd on Linux Mint 13

FTP stands for “file transfer protocol”, and it allows you to transfer files to a remote computer. FTP has been around forever, and it has a number of pros and cons. Since FTP is so old, it is supported on virtually every operating system, and most operating systems include an FTP client of some kind. Linux Mint 13 can act as an FTP server with a reasonable degree of security. In this post, we’ll show you how to set up Linux Mint 13 as an FTP server.

The most common FTP server software for Linux Mint is the vsftpd package, which stands for “very secure FTP daemon.” It’s the default FTP package for Linux Mint 13, and most other Linux distributions as well. As an added bonus, vsftpd is pretty secure out of the box – to make it insecure, you have to go out of your way to mess up the configuration file.

As an added bonus, vsftpd is simple to install and configure on a Linux Mint 13 machine. To install the vsftpd package, make your way to a command prompt and type this command:

sudo apt-get install vsftpd

Enter your password to authenticate and apt will download and install vsftpd for you.

Follow the default prompts, and the vsftpd server will be installed on your computer. Generally, the default configuration for vsftpd is pretty secure, and good enough for casual use. Anonymous users are allowed, but no one can write files to the server (or, in FTP terminology, no one can upload files to the server). However, this configuration isn’t very good if you want people to be able to write files to the server, so we’ll show you how to securely set that up by changing vsftpd’s settings.

If you want to change any settings, the configuration file for vsftpd is /etc/vsftpd.conf. Like any other configuration file, you can edit it with vi:

sudo vi /etc/vsftpd.conf

The vsftpd.conf file contains a large number of “directives” that govern how the server behaves and operates. If you want to change its configuration, you’ll need to alter the directives.

If you want people with local user accounts on the FTP server to be able to connect via FTP (you usually do), you will need to change this directive:

#local_enable=YES

To this:

local_enable=YES

If you do not change this directive, only anonymous users will be able to log into your FTP server, which is bad. (More on that below.)

If you want users to be able to write files to your FTP server, change this directive:

#write_enable=YES

To this:

write_enable=YES

With the write_enable directive set to YES, users will be able to upload files to your FTP server. Note, however, that they will only be able to do so if they have proper permissions to the directories in question. They’ll be able to upload files to their home directories, but not, for instance /var or /usr.

Anonymous access is controlled with this directive:

anonymous_enable=NO

Under no circumstances should you allow anonymous access to your FTP server, especially if it is accessible from the Internet! There are certain circumstances when you might find it useful, but you should only enable it if you know exactly what you are doing. Generally, it is almost always best to keep anonymous_enable set to NO. Especially if you allow users to write files to your FTP server, then it is very important to have anonymous_enable set to NO.

If you make any changes to the file, switch vi to command mode, save the changes, and then exit vi. Then restart the vsftpd server so it reads its new directives:

sudo service vsftpd restart

Your Linux Mint machine should now have a functional FTP server.

-JM

ADDITIONAL READING:

The Ubuntu Beginner’s Guide

The Ubuntu Desktop Beginner’s Guide.

This entry was posted in Linux Mint 13. Bookmark the permalink.

3 Responses to Install FTP Server with vsftpd on Linux Mint 13

  1. Pingback: How to set up very simple 2 laptop wifi network to just send files between them ?

  2. cipher says:

    This is nice, but doesn’t work.
    First, you don’t tell us that you must be in root or use sudo to even start.

    sudo vsftpd
    yields this error message:
    500 OOPS: could not bind listening IPv4 socket

    So apparently it is NOT as simple as you say. Any chance you could do a full tutorial for this? Thanks…

  3. Neo says:

    With a handle like “cipher” one would think that you have some sort of skill or ability to work through a problem. First off this is Linux….so root and sudo should be assumed. Second the IPv4 bind error you get is something wrong the IP stack on your machine. One would again assume a working TCP/IP stack is a requirement.

    I followed the steps it worked just fine. Thanks for the tutorial JM.

    Neo