FTP (File Transfer Protocol) is probably the most popular method of uploading files to a server; a wide array of FTP servers, such as vsftpd, and clients exist for every platform.
- These instructions are intended specifically for installing the vsfptd on Fedora 22.
- I’ll be working from a Liquid Web Self Managed Fedora 22 server, and I’ll be logged in as root.
Step 1: Install VSFTPD
As a matter of best practice we’ll update our packages:
dnf -y update
Then let’s install vsftpd and any required packages:
dnf -y install vsftpd
Step 2: Configure VSFTPD
For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor
Let’s edit the configuration file for vsftpd:
Disallow anonymous, unidentified users to access files via FTP; change the anonymous_enable setting to NO:
Allow local uses to login by changing the local_enable setting to YES:
If you want local user to be able to write to a directory, then change the write_enable setting to YES:
Local users will be ‘chroot jailed’ and they will be denied access to any other part of the server; change the chroot_local_user setting to YES:
Exit and save the file with the command :wq.
Restart the vsftpd service:
systemctl restart vsftpd
Then set the vsftpd service to start at boot:
systemctl enable vsftpd
Step 3: Allow VSFTPD Through the Firewall
Allow the default FTP port, port 21, through firewalld:
firewall-cmd --permanent --add-port=21/tcp
And reload the firewall:
There are a couple of common vsftpd errors that we’ve already solved for you! Check out the following articles if you run into further issues.
- Error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot() [SOLVED]
- Error: 500 OOPS: priv_sock_get_cmd [SOLVED]
- Error: 500 OOPS: priv_sock_get_int [SOLVED]
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.