Author: Steven Neiland
Published:

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

Step 2: Set VSFTPD as your ftp server

To setup vsftpd as our ftp server we must edit the "inetd.conf" file which is our super server and calls the vsftpd daemond.

vi /etc/inetd.conf

Scroll down the file until you find the following section. Uncomment the ftp line and save the file.

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

Step 3: Configure VSFTPD

Next we need to configure vsftpd based on our needs. Simply open the file and uncomment/modify each line as makes sense for your requirements.

vi /etc/vsftpd.conf

Create List of Users who may use FTP

For my configuration I am going limit what users can use ftp and lock them to their home directory. Note: Never add the root user to this list.

To do this we first create a file "/etc/vsftpd.user_list" and add each user we want to give ftp access. Put each username on a new line.

vi /etc/vsftpd.user_list

Next we open the vsftpd.conf file (as above) and set the following three lines to select this list, enable it and set its mode to allow only those listed (as opposed to deny those listed).

# Set the userlist_file to /etc/vsftpd.user_list
# Set the userlist_enable to yes to use this file
# Set the userlist_deny to NO so that only users listed can ftp
# as opposed to users listed being excluded
userlist_file=/etc/vsftpd.user_list
userlist_enable=YES
userlist_deny=NO

Finally we ensure that the listed users can only access their own home directory by enabling this setting>

# Lock down local users to home directory
chroot_local_user=YES
1 2 3

What Do You Think?

Reader Comments

Inukaze's Gravatar
Inukaze
Monday, February 20, 2017 at 12:00:37 AM EST

When i follow this guide, and try to test ftp with FileZilla, appears the follow error : 500 OOPS: could not bind listening IPv4 socket

Post a Comment

Comment Etiquette:

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain or appear to be advertisments, will not be published.
  • Comments that appear to be created for the purpose of linkbuilding to commercial sites will be removed.

We are all adults here so play nice.

*
*



Archives Blog Listing

Tag Listing

Learn CF In A Week

Treehouse

 
Fork me on GitHub