This are the steps to configure a FTP Server in Red Hat Enterprise Linux and CentOS Linux:
Before proceed, stop the firewall
# service iptables stop
# service ip6tables stop
# chkconfig iptables off
# chkconfig ip6tables off
Now in case FTP service is not installed, do the next:
# yum install -y vsftpd
After the installation, start the vsftpd service:
# service vsftpd restart
Enable vsftpd in multi-user level:
# chkconfig vsftpd on
Now edit the FTP config file /etc/vsftpd/vsftpd.conf
As best security practice comment the next line:
# Allow anonymous FTP? (Beware - allowed by default if you comment this out). #anonymous_enable=NO Now restart the vsftpd service: # service vsftpd restart Note: Root is not allowed to connect to ftp server by default for security purpose. So create a new user or use an existing local user to connect. Before connect to ftp server, make sure you have already installed the ftp client running the next command: # rpm -qa | grep ftp You should see something like this: ftp-0.17-54.el6.x86_64 If ftp client is not installed, run the next command: # yum install -y ftp Now you can try to connect to the new ftp server: # ftp localhost.localdomain After logged if you receive this error:
Password:
500 OOPS: cannot change directory:/home/william
Type exit to return back from the ftp console and allow vsftpd daemon to change users into their $HOME directories. To do that update SELinux configuration using the command below.
# setsebool -P ftp_home_dir on
Now try again to connect to the FTP server and everything should be running fine.
Now your ftp server is up and running and ready to transfer. You can access to it using a ftp GUI client like FileZilla, or by command, or via web, etc.