3-simple
--
Install Vsftpd FTP Server
Install vsftpd
All commands should be run with ‘root’ user. Run the following command in terminal to install vsftpd package:
yum install vsftpd ftp -y
Configure vsftpd
Edit vsftpd configuration file /etc/vsftpd/vsftpd.conf,
vi /etc/vsftpd/vsftpd.conf
Find the following lines and make the changes as shown below:
[...] ## Disable anonymous login ## anonymous_enable=NO ## Uncomment ## ascii_upload_enable=YESascii_download_enable=YES ## Uncomment - Enter your Welcome message - This is optional ## ftpd_banner=Welcome to UNIXMEN FTP service. ## Add at the end of this file ## use_localtime=YES
Enable and start the vsftpd service:
systemctl enable vsftpd systemctl start vsftpd
Firewall And SELinux Configuration
Allow the ftp service and port 21 via firewall.
firewall-cmd --permanent --add-port=21/tcp firewall-cmd --permanent --add-service=ftp
Restart firewall:
firewall-cmd --reload
Then, update the SELinux boolean values for FTP service:
setsebool -P ftp_home_dir on
--------------------X--------------------------
# yum install vsftpd
Edit the configuration file located at ‘/etc/vsftpd/vsftpd.conf‘ to secure vsftpd.
# vi /etc/vsftpd/vsftpd.conf
Edit a few fields and leave other as it is, unless you know what you are doing.
anonymous_enable=NO local_enable=YES write_enable=YES chroot_local_user=YES
You may also change the port number and open vsftpd port through the firewall.
# firewall-cmd --add-port=21/tcp # firewall-cmd --reload
Next restart vsftpd and enable to start at boot time.
# systemctl restart vsftpd # systemctl enable vsftpd
1. From your Filezilla client, go to Edit -> Settings -> FTP ->Active Mode.
In the Active Mode tab, make sure the option “Ask your operating system for the external ip address” is selected.
Then goto Edit -> Settings -> FTP ->Passive Mode. Select “Fall back to active mode” and click Ok.
Now the error will be gone in some cases (May be in Windows OS clients).
--