Menu

How to install and configure vsftpd on CentOS 5

2 min read June 28, 2013 at 8:08pm on Tutorials

This tutorial is going to outline the installation and configuration of vsftpd which is a secure and powerful FTP server for Linux based systems.

You will first want to install vsftpd via yum:

yum install vsftpd

After it’s installed, you’ll want to make some configuration changes.

First, you will need to stop vsftpd:

service vsftpd stop

Then edit the configuration file via nano:

nano /etc/vsftpd/vsftpd.conf

You will want to configure the following settings:

anonymous_enable=NO
local_enable=YES
write_enable=YES

Now you will need a username and login – so lets create it:

useradd -d /var/www/dir -s /usr/sbin/nologin ftpusername

Setup the password for the username you just created:

passwd ftpusername

Remember, this user will be assigned access to directory so be sure to adjust this setting to your liking:

chown -R ftpusername /path/to/dir

chmod 775 /path/to/dir

Now you will want to create a userlist file via nano and then add the username:

nano /etc/vsftpd/vsftpd.user

And then add the username to the file:

ftpusername

Save and exit.

Configure the configuration file:

# the list of users to give access
userlist_file=/etc/vsftpd.user

# this list is on
userlist_enable=YES

# It is not a list of users to deny ftp access
userlist_deny=NO

Then make sure the following file looks like this:

cat /etc/shells

/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/bin/dash
/bin/bash
/bin/rbash
/usr/sbin/nologin

If not, then you need to adjust it with the settings above.

Finally, you’re ready to fire things up and give it a shot.

service vsftpd start

Get started today. SIGN UP

Services

Client

Copyright Kazila 2017 © All Rights Reserved