- These instructions are intended specifically for installing the vsfptd on Fedora 21.
- I’ll be working from a Liquid Web Self Managed Fedora 21 server, and I’ll be logged in as root.
Step 1: Install vsftpd
Warning: FTP data is insecure; traffic is not encrypted, and all transmissions are clear text (including usernames, passwords, commands, and data). Consider securing your FTP connection with SSL/TLS.As a matter of best practice we’ll update our packages:
yum -y updateThen let’s install vsftpd and any required packages:
yum -y install vsftpd
Step 2: Configure vsftpdFor 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:
vim /etc/vsftpd/vsftpd.confDisallow anonymous, unidentified users to access files via FTP; change the anonymous_enable setting to NO:
anonymous_enable=NOAllow local uses to login by changing the local_enable setting to YES:
local_enable=YESIf you want local user to be able to write to a directory, then change the write_enable setting to YES:
write_enable=YESLocal 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:
chroot_local_user=YESExit and save the file with the command :wq. Restart the vsftpd service:
systemctl restart vsftpdThen set the vsftpd service to start at boot:
systemctl enable vsftpd
Step 3: Allow vsftpd Through the FirewallAllow the default FTP port, port 21, through firewalld:
firewall-cmd --permanent --add-port=21/tcpAnd reload the firewall: