2007年1月29日星期一

FTP setup on Redhat Linux



FTP setup on Redhat Linux

FTP is a common file transfer protocol in the internet, and a lot of users use FTP to exchange files. The followings are the instructions to setup FTP server on Redhat linux.
1. Install vsftd on the server. This is software will be installed by default during OS installation.
2. Modify "/etc/vsftpd/vsftpd.conf" to change something:
anonymous_enable=NO // anonymouse should be disabled
chroot_local_user=YES //chroot to user home directory
chroot_list_enable=NO //restrict user to special directory
pasv_enable=YES pasv_min_port=65400 pasv_max_port=65490 // make pasv available for connection. This is default mode for most ftp client tools. If you open this option, please modify firewall to make it effective.
pam_service_name=vsftpd
serlist_enable=YES
#enable for standalone mode
listen=YES
pasv_promiscuous=YES
pasv_enable=YES
pasv_min_port=65400
pasv_max_port=65490
3. Create ftp user, the default group is ftp.
#useradd -g ftp -s /sbin/nologin -M -d /home/ftp/username -p password username
#mkdir /home/ftp/username
#chown -R username.ftp /home/ftp/username
If you want to change the ftp user password, please use following command:
#passwd username
Explain: "-M" indicates not to create home directory for user. "-s" indicates shell for user. Here we use "/sbin/nologin" to indicate ftp user should be permitted to login system for security problem.
4. Start the vsftpd and do some test.
#service vsftpd start


朱恒
2007-01-29








没有评论: