Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and tuning method of FTP under linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains the method of installation and tuning of FTP under linux. The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn the method of installation and tuning of FTP under linux.

Text:

1.1 FTP installation

# FTP Service

Yum install-y vsftpd

# FTP client

Yum install-y ftp

# FTP tool

Yum install-y lftp

# restart FTP

Service vsftpd restart

# self-start

Chkconfig vsftpd on

1.2 set access mode

# captivity mode

Whether chroot_local_user=YSE# restricts all users to the home directory, YES is disabled to enable NO. (the default value is NO, that is, if there is no configuration after installing vsftpd, ftp users can switch up to outside the desired directory)

Note: configure chroot_local_user=yes under CentOS7. After configuration, it is found that it cannot be accessed, and the remote host closes the connection.

Solutions are as follows:

1. Add a configuration

Vim / etc/vsftpd/vsftpd.conf

Allow_writeable_chroot=YES

2. Re-grant permissions

Chmod 755 / home/ftp_coperate

1.3 create a FTP account

1. Add linux users

Useradd-s / sbin/nologin ftp_coperate

2. Reset password

Passwd ftp_coperate

Set password ifytek

3. Restart FTP

Service vsftpd restart

4. If there is no permission, it may be that / etc/init.d/vsftpd does not grant the execution permission, chmod + x vsftpd. Execute it again after the authorization is successful.

5. If you add users in / sbin/nologin mode, you may not be able to log in under centos7. Solution:

Usermod-s / bin/bash ftp_coperate

1.4 FTP parameter tuning

Vi / etc/vsfptd/vsfptd.conf

Add the following parameters to the conf file:

Max_clients=10240 # maximum number of connections, no limit is changed to 0

Max_per_ip=1000 # maximum number of connections per IP, no limit is changed to 0

Need to restart ftp

Service vsftpd restart

Note: if you need to limit the upload rate, you can set it.

Anon_max_rate=50000 # restricts anonymous user 50KB

Local_max_rate=200000 # restrict local user 200KB

1.5 FTP client access tuning

1.5.1 JAVA client

Quote API org.apache.commons.net.ftp.FTPClient

/ / set passive mode (upload and download from FTP clients are easy to fail) ftpClient.enterLocalPassiveMode (); / / when operating FTP files, change to the file's current directory ftpClient.changeWorkingDirectory (new String ("GBK"), FTP.DEFAULT_CONTROL_ENCODING)) Thank you for reading, the above is the content of "installation and tuning method of FTP under linux". After the study of this article, I believe you have a deeper understanding of the installation and tuning method of FTP under linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report