Automatically deploy FTP service scripts

Source: Internet
Author: User

Basically, it's okay to use the combination.

/Etc/PAM. d/vsftpd # PAM Authentication configuration file

/Etc/vsftpd/ftpusers # blacklist user list

/Etc/vsftpd/user_list # user list (black and white adjustable)

/Etc/vsftpd. conf # main configuration file


Yum-y install vsftpd

Configure anonymous FTP

Chown FTP/var/FTP/pub/

Sed-I '/nonymous_enable =/A anon_umask = 022'/etc/vsftpd. conf # anonymous upload permission mask

Sed-I's/^ # anon_upload/'/etc/vsftpd. conf # anonymous upload allowed

Sed-I's/^ # anon_mkdir _/'/etc/vsftpd. conf # create a subdirectory during Anonymous Access

Sed-I '/^ anon_mkdir _/A anon_other_write_enable = Yes'/etc/vsftpd. conf # Other write permissions for anonymous access

Service vsftpd restart

Chkconfig vsftpd on


Cancel Anonymous

Sed-I '/^ anonymous_enable/S/yes/no/'/etc/vsftpd. conf



Implement User-verified vsftpd service

 

Sed-I's/^ # chroot_list_enable/'/etc/vsftpd. conf

Sed-I '/chroot_list_enable/A chroot_local_user = Yes'/etc/vsftpd. conf # ban system users


Limit the number of concurrent workers and transmission speed.


Sed-I '$ # The user limit'/etc/vsftpd. conf # insert comment row

Sed-I '$ A max_clients = 100'/etc/vsftpd. conf # maximum number of concurrent connections

Sed-I '$ A max_per_ip = 5'/etc/vsftpd. conf # maximum number of concurrent connections per IP Address

Sed-I '$ A anon_max_rate = 100'/etc/vsftpd. conf # The anonymous access limit is 100000 kb/s.

Sed-I '$ A local_max_rate = 100'/etc/vsftpd. conf # the System user access speed is 200000 kb/s.



Automatically deploy FTP service scripts

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.