Setup Linux ftp server - Install and configure vsftpd in Slackware

FTP is an Internet file transfer protocol. It's used widely to transfer data between the Internet, WAN and LAN network around the world. In Slackware Linux, ftp server and ftp client are included in default installation. Proftpd is a default ftp server in Slackware for many years but starting from version 10.2, Slackware ships vsftpd in the official packages as well. In this tutorial, we'll learn how to setup vsftpd as ftp server in Slackware Linux and configure vsftpd.conf file to customize ftp server to our needs.

If you are using other Linux distribution, you can also use this tutorial as a guide. The vsftpd ftp server package comes with Fedora and other major distributions too but if you can't find it in your Linux, you can download the package from your Linux distribution's website or source from the vsftpd official website.

This tutorial is a beginner's guide on how to setup vsftpd ftp server in Slackware Linux. The tutorial covers:

Check vsftpd in Slackware Linux

Firstly, we need to check vsftpd package in our Linux system. Normally we can use Linux package management system to check installed package and use Linux ps command to verify the running service. We can also check log for installed packages. In Slackware Linux, we can use pkgtool to check whether vsftpd has been installed or not. See example below:

Open Linux terminal and type pkgtool and press enter.

[email protected]:~# pkgtool

Use arrow down key and choose View option to view the list of files in a package.

pkgtool interface chose view option screenshot

Press v key to go the package name start with v. Press arrow key and search for vsftpd.

pkgtool interface view vsftpd screenshot

Press enter to read information about vsftpd package. The Very Secure FTP Daemon was written by Chris Evans.

pkgtool interface vsftpd view package screenshot

Press Tab key to move cursor to the Cancel button. Enter to exit.

pkgtool interface exit vsftpd screenshot

Press Tab key again to move cursor to the Cancel button. Enter to exit.

Exit pkgtool interface screenshot

You can also check vsftpd package in /var/log/packages:

[email protected]:~# ls /var/log/packages/ | grep vsftpd
[email protected]:~#

We can see that vsftpd is already installed in my Slackware. Don't worry, here is a guide on how to install vsftpd in Slackware in case yours is not installed:

Install vsftpd in Slackware Linux

The less hassle way to install vsftpd in Slackware Linux is using slackpkg. However, you need to install and configure slackpkg before you can use it because slackpkg is not installed by default. You also need an Internet connection. See Slackware package management system on how to use slackpkg. To install vsftpd using slackpkg, invoke the command below:

[email protected]:~# slackpkg install vsftpd

The easiest way is to use pkgtool and install vsftpd from Slackware dvd installer. You have to mount Slackware dvd installer before issuing the pkgtool command. In the pkgtool main menu, choose to install from other directory and provide the path of the mounted Slackware dvd installer.

If you don't have the installer, then the final choice would be downloding vsftpd package from Slackware packages website: Slackware packages. Then use installpkg command: installpkg [-m] packagename to install vsftpd.

Configure vsftpd as Slackware ftp server

vsftpd stands for very secure file transfer program daemon. It's secure, light and the most popular ftp server at the moment. To configure vsftpd server, let's take a look at the configuration file, vsftpd.conf. Issue vim /etc/vsftpd.conf command to open the configuration file with vim text editor and edit to suite your need (of course you can use any text editor that you prefer).

[email protected]:~$ vim /etc/vsftpd.conf

Note: You must have root privilege to edit and save the file. If you login as a normal user, use 'su -' command and enter root password.

This script is straight forward. There shouldn't be any problem to understand the script even for a first time user. Remove comment (remove #) to allow any rules and options.

activate vsftpd server

# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
# (default follows)
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (default follows)
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
# To run vsftpd in standalone mode (rather than through inetd), uncomment
# the line below.

Now we must activate vsftpd daemon to start using our ftp server. In slackware, we can do this by editing the super server, inetd.conf. Type vim /etc/inetd.conf and remove comment at the beginning of vsftpd line:

# Very Secure File Transfer Protocol (FTP) server.
ftp stream tcp nowait root /usr/sbin/tcpd vsftpd

Enter :wq! to save the vsftpd.conf file and exit vim editor.

Restart vsftpd ftp server

Now we can restart vsftpd service so that the new configuration take effect. If you are using the default Slackware vsftpd configuration as in the example above, you can restart inetd with the command below:

[email protected]:~$
[email protected]:~$ /etc/rc.d/rc.inetd restart

The inetd super server starts automatically during Slackware booting. If you need to start inetd manually, you can use the same command as above and replace 'restart' with 'start'. See example below:

[email protected]:~$
[email protected]:~$ /etc/rc.d/rc.inetd start

Test vsftpd ftp server

To test our new ftp server, open a new terminal and login as a normal user. Login to the ftp server by typing ftp at the command prompt. See an example below:

[email protected]:~$ ftp
ftp> open
Connected to

If you can connect to the ftp server, that means you successfully setup vsfpd ftp server in Slackware Linux. Depends on how you configure vsftpd.conf file, you must provide username, whether it's local user account or anonymous. You can find more about ftp client commands at Linux ftp tutorial - FTP client guides.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.