Configuration for private/test environment only - do not use in production! You need to execute all steps as root.
Disable the firewall:
# service iptables stop # service ip6tables stop # chkconfig iptables off # chkconfig ip6tables off
Install the vsftpd package:
# yum install vsftpd # service vsftpd start # chkconfig vsftpd on
Edit /etc/vsftpd/vsftpd.conf and change the following entries (setting a banner is optional):
anonymous_enable=NO ascii_upload_enable=YES ascii_download_enable=YES ftpd_banner=Welcome to <YOUR SERVER> use_localtime=YES
Restart vsftpd to apply changes:
# service vsftpd restart
Install the ftp package:
# yum install ftp
Create a user to connect to (using root is very unsave):
# useradd <FTPUSER> # passwd <FTPUSER>
Set $HOME for <FTPUSER>:
# setsebool -P ftp_home_dir on
Disable SELinux
vi /etc/selinux/config
Change SELINUX=enforcing to SELINUX=disabled - reboot required
Get your ip if you don't know it already:
# ifconfig
Connect to ftp:
# ftp <YOUR.IP>
Change hostname:
# vi /etc/sysconfig/network
Change HOSTNAME=<abc.def> to HOSTNAME=<YOUR.HOSTNAME>
Enable ftp acces via root (not recommended - use at own risk):
# vi /etc/vsftpd/ftpusers
Comment out root
# vi /etc/vsftpd/user_list
Comment out root