**vsftpd** (**V**ery **S**ecure **F**ile **T**ransport **P**rotocol **D**aemon) is a secure, fast FTP server for Unix/Linux systems. In this how-to article, let us see how to setup a basic FTP server using vsftpd on openSUSE 13.1.
### Install vsftpd ###
Login as root user and Enter the following the following command.
# zypper in vsftpd
Start vsftpd service and make it to start automatically on every reboot.
# systemctl enable vsftpd.service
# systemctl start vsftpd.service
### Configure vsftpd ###
Create a folder for ftp users.
# mkdir /srv/ftp
Create a group called **ftp-users**.
# groupadd ftp-users
Let us create a sample user called unixmen with home directory **/srv/ftp** and group **ftp-users**.
# useradd -g ftp-users -d /srv/ftp/ unixmen
Set password for the new user.
# passwd unixmen
Make the ftp home directory **/srv/ftp/** accessible by ftp users.
# chmod 750 /srv/ftp/
# chown unixmen:ftp-users /srv/ftp/
Edit file vsftpd.conf,
# nano /etc/vsftpd.conf
Make the changes as shown below.
[...]
#Uncomment and Set YES to enable write.
write_enable=YES
[...]
# Uncomment and Set banner name for your website
ftpd_banner=Welcome to Unixmen FTP service.
[...]
# Uncomment
ls_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=YES
ascii_download_enable=YES
[...]
## Add at the end of this file ##
use_localtime=YES
Save and exit file.
### Test FTP Server Locally ###
First let us try to login to our FTP server as shown below.
# ftp localhost
Trying ::1:21 ...
Connected to localhost.
220 (vsFTPd 3.0.2)
Name (localhost:root): unixmen
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
As you in the above output, we will be able to login to ftp server using unixmen user.
### Test FTP Server Remotely ###
By default openSUSE built-in firewall won’t allow to login to FTP from remote systems. So let us allow vsftpd service through suse firewall. To do that go to **Yast -> Security and Users -> Firewall**.
In the Firewall section, go to **Allowed Services**. In the zone selection drop down box, select **External Zone** and in Service to Allow drop-down box, select **vsftpd server** and click add.
I tried to login to FTP server from my ubuntu desktop.
sk@sk:~$ ftp 192.168.1.53
Connected to 192.168.1.53.
220 (vsFTPd 3.0.2)
Name (192.168.1.53:sk): unixmen
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
As you see in the above output, I will be able to connect to FTP server. If you doesn’t allow the vsftpd service through firewall you will get a Connection timed out error.
### Connect from Browser ###
Open up your browser and Navigate to **ftp://ip-address/**. Enter the ftp user name and password.
Working from command-line mode might be little bit annoying to newbies. So let us install a graphical FTP client called [**Filezilla**][1] to get things done quite easier:
Mostly all distribution will have filezilla client in their official repository. To install filezilla on Linux based systems enter the following command:
On Ubuntu based systems:
$ sudo apt-get install filezilla
On Fedora/Redhat systems:
$ sudo yum install filezilla
On openSUSE:
# zypper in filezilla
After installing filezilla open it. Enter the ftp server IP address, user name and password and click quickconnect.