CentOS to build an FTP server and brief introduction of _FTP server

Source: Internet
Author: User

CentOS Build FTP Server

1. Install VSFTPD

sudo yum install vsftpd

2. Configure vsftpd.conf


# Allow anonymous FTP? (beware-allowed by default if your comment this.
) Anonymous_enable=no

# When SELinux are enforcing check for SE bool Ftp_home_dir
local_enable=yes


write_ Enable=yes

# Local FTP directory address
local_root=/var/ftp

3. Add FTP User

#创建用户
adduser-d/var/ftp-g ftp-s/sbin/nologin *_ftp

#修改密码
passwd *_ftp


4. Upload permission

# Modify Upload Path Permissions 777  More personal preferences set permissions
sudo chmod-r 777/var/ftp

# View FTP settings
getsebool-a|grep FTP

ftp_home_dir-- > on
ftpd_anon_write--> off
ftpd_connect_all_unreserved--> off
ftpd_connect_db-->
off Ftpd_full_access--> on
ftpd_use_cifs--> off
ftpd_use_fusefs--> off
ftpd_use_nfs--> off< C13/>ftpd_use_passive_mode--> off
httpd_can_connect_ftp--> off
httpd_enable_ftp_server--> off
sftpd_anon_write--> off
sftpd_enable_homedirs--> off
sftpd_full_access--> off
sftpd _write_ssh_home--> off
tftp_anon_write--> off
tftp_home_dir--> off

# modify Ftp_home_dir, Ftpd_ Full_access to on
setsebool-p Ftp_home_dir=on Ftpd_full_access=on

5. Set VSFTP boot

Chkconfig vsftpd on

6. Add Firewall

Firewall-cmd--permanent--add-service=ftp

Firewall-cmd--reload

Thank you for reading, I hope to help you, thank you for your support for this site!

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.