Vsftpd (Secure File Transfer Protocol Daemon) is a secure and fast FTP server in Unix/Linux systems. In this tutorial, let's take a look at how to use vsftpd to configure a basic FTP server in openSUSE 13.1.
Install vsftpd
Log on as the root user and enter the following command.
# zypper in vsftpd
Start the vsftpd service and enable it to automatically start every time the system restarts.
# systemctl enable vsftpd.service# systemctl start vsftpd.service
Configure vsftpd
Creates a folder for the ftp user.
# mkdir /srv/ftp
Create a group named ftp-users.
# groupadd ftp-users
Let's create an example user named unixmen and set its home directory to/srv/ftp group to ftp-users.
# useradd -g ftp-users -d /srv/ftp/ unixmen
Set a password for the new user.
# passwd unixmen
Make the ftp home directory/srv/ftp/accessible to ftp users.
# chmod 750 /srv/ftp/# chown unixmen:ftp-users /srv/ftp/
Edit the vsftpd. conf file
# nano /etc/vsftpd.conf
Set the following changes.
[...]#Uncomment and Set YES to enable write.write_enable=YES[...]# Uncomment and Set banner name for your websiteftpd_banner=Welcome to Unixmen FTP service.[...]# Uncommentls_recurse_enable=YES[...]# Uncomment and set YES to allow local users to log in.local_enable=YES[...]# To disable anonymous access, set NO.anonymous_enable=NO[...]# Uncomment to enable ascii download and upload.ascii_upload_enable=YESascii_download_enable=YES[...]## Add at the end of this file ##use_localtime=YES
Save and exit the file.
Test the local FTP Server
First, follow these steps to log on to the FTP server:
# ftp localhostTrying ::1:21 ...Connected to localhost.220 (vsFTPd 3.0.2)Name (localhost:root): unixmen331 Please specify the password.Password: 230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>
As you have output above, we can use the unixmen user to log on to the ftp server.
Recommended reading:
Four Advanced configurations of vsftpd Server:
VsFTPd configuration Tutorial:
Simple and practical Ubuntu FTP setup
Set up FTP server and Apache server on Ubuntu
Install the LAMP \ vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04
Simple case of anonymous uploading of SeLinux and vsftpd on the RHEL6 Platform
Install vsftpd source code in Linux
Case study of vsftpd Security Configuration