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
Reader Comments
Monday, February 20, 2017 at 12:00:37 AM Coordinated Universal Time
When i follow this guide, and try to test ftp with FileZilla, appears the follow error : 500 OOPS: could not bind listening IPv4 socket