CentOS config FTP (VSFTPD)

Source: Internet
Author: User
Tags ftp connection

VSFTP Installation Section # installation vsftpdyum-y install vsftpd# start service vsftpd start# on start chkconfig vsftpd on second, vsftp related command Service # Start the FTP services service VSFTPD start# View FTP Service status service VSFTPD status # Restart FTP service services VSFTPD restart# close FTP services service VSFTPD Stop III, VSFTP configuration Chapter # Enter vsft PD profile vim/etc/vsftpd/vsftpd.conf # Disable anonymous user Anonymous Logon anonymous_enable=no# allow local users to log on local_enable=yes# Let the logged-in user have write permission (upload, delete) write_enable=yes# default umasklocal_umask=022# save log of transfer record to/var/log/vsftpd.logxferlog_enable= yesxferlog_file=/var/log/vsftpd.logxferlog_std_format=no# allow ASCII mode upload ascii_upload_enable=yes # Allow ASCII mode download ascii_download_enable=yes# use port 20th to transmit data connect_from_port_20=yes# Welcome banner ftpd_banner=welcome to using my test FTP server.# the next three configuration is important # Chroot_local_user set the Yes, then all users by default will be chroot,# and the user directory is limited to their home, unable to change the directory up. # chroot_list_enable Set the Yes, which makes the chroot user list valid. #★ Super Important: If Chroot_local_user set the Yes, then chroot_list_file# set the file, is not chroot users (can change the directory up) #★ Super Important: If the Chroot_local_user set no , then the chroot_list_file# set file is chroot user (unable to change the directory up) chroot_list_enable=yes# Touch/Etc/vsftpd/chroot_list New chroot_list_file=/etc/vsftpd/chroot_listuse_localtime=yes# runs on IPv4 in standalone mode listen= yes# Pam Authentication Service name, here by default is VSFTPD, in the installation of VSFTPD has created this Pam file, # in/ETC/PAM.D/VSFTPD, according to the settings in this Pam file,/etc/vsftpd/ftpusers# Users in the file will not be allowed to log on to the FTP server, such as root sensitive users, so you want to prohibit other users # login, you can also add the user to the/etc/vsftpd/ftpusers. pam_service_name=vsftpd# Restart Vsftpdservice vsftpd Restart Iv. vsftp User article # Create user useradd-d/opt/www-s/sbin/nologin-m aidejin# Set User to Folder Chown-r aidejin/opt/www# set permissions chown-r 777/opt/www# add password passwd aidejin password---Confirm password Five, FTP connection is not, prompt read directory failure This error is caused by the Iptables configuration, the temporary workaround is to execute the following command: Modprobe ip_nat_ftp But when you restart the server the Iptables rule fails and the same happens, so we need to modify the/etc/sysconfig/ Iptables-config file vi/etc/sysconfig/iptables-configiptables_modules= "ip_nat_ftp" iptables_modules_unload= "yes" VI, VSFTPD cannot upload file View configuration sestatus-b|grep FTP command line settings setsebool-p ftp_home_dir onsetsebool-p allow_ftpd_anon_write onsetsebool-p  Allow_ftpd_full_access onsetsebool-p allow_ftpd_use_cifs onsetsebool-p allow_ftpd_use_nfs onservice vsftpd Restart

  

CentOS config FTP (VSFTPD)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.