ProFTPD Study Notes (3)

Source: Internet
Author: User
Tags ftp login

In the previous two notes, I think you should have some knowledge about ProFTP settings. Is it similar to Apache configuration. I want to configure the serv_u server. Let's take a look at the ProFTP configuration rules and I should be able to configure a powerful ProFTP server immediately.

Here we will talk about other ProFTP parameter configurations:

Maxhostsperuser 1 "sorry, each account can have up to one source IP address"
# Maxhostsperuser is useful for preventing FTP accounts.

Maxclientsperuser 1 "sorry, each account can log on to each client at most once"
# This parameter can prevent the server from being damaged by multi-threaded software downloads.

Maxclientsperhost 1 "sorry, only one account can log on to the same client"
# For example, you have many accounts on the FTP server, but you can only log in with one account.

Haha, these three max parameters are easy to get dizzy. You can find out what they mean :)

Wtmplog on
# Whether to record FTP logs in logs. If you do not want to, you can set it to off to shield log logs.

Timeoutidle 600
# Client idel time setting. The default value is 600 seconds.

Displaylogin welcome. msg
# Set the FTP login welcome information file

The settings of the welcome File Include the following parameters:

% T current time

% F remaining disk capacity

% C Current Directory

% R client host name

% L server host name

% U User Account Name

% M maximum number of allowed connections

% N current server connection count

% E ftp server administrator email

% I number of files uploaded this time

% O number of files downloaded this time

% T number of files uploaded and downloaded

With these parameters in mind, we can write a friendly welcome speech.

VI/home/kaoyan/welcome. msg

Welcome to % u. This is Frank's test FTP server;
Current Time: % T;
The server allows a maximum of % m user connections;
Currently, there are % N user connections on the server;
Your current directory is % C;
% F bytes are left on the hard disk where the directory is located.

It is not supported by default to allow ProFTP to support the popular fxp transmission mode.
You only need to set

Allowforeignaddress on

Passiveports 49152 65534 # port can also be specified as your favorite

Don't forget to set it to support fxp on the client. Otherwise, I tried it several times and thought the server was not set up. In fact, the client was not set.

By default, ProFTP does not support root login. We can set it to allow root users to log on to FTP. However, we recommend that you do not allow root users to log on to FTP. The settings are as follows:

Rootlogin on

How to disable an address from accessing ftp
For example, you can disable hosts in the 10.1.1 CIDR Block from accessing ftp.

<Limit login>
Order deny, allow
Deny from 10.1.1.
Allow from all
</Limit>

The establishment of Virtual FTP is generally used for an FTP server with many IP addresses, or FTP uses different ports. The basic setting syntax is:

For example, we need to create an FTP server with a port of 5555:

<Virtualhost 210.51.0.124>
Servername "Frank FTP server"
Port 5555
...
<Directory>
...
<Limit action>
...
</Limit>
...
</Directory>
</Virtualhost>

Other settings in the VM are similar to the ones I mentioned earlier.

When setting the upload/download ratio, my friends who have used serv_u must know how to use this function. Here we will allow ProFTP to implement this function.
To implement functions, note that the ratio module is added during compilation. Otherwise, ProFTP is not supported by default. Assume that the FTP directory of ftp1 is in/home/kaoyan, then we set the ftp1 upload/download ratio to (that is, 1 MB for uploading and 2 MB for downloading)

Touch/home/kaoyan/ratio. dat
Touch/home/kaoyan/ratio. tmp
Chmod-r 666/home/kaoyan

Set ProFTPd. conf as follows:

Ratios on
Saveratios on
Ratiofile/home/kaoyan/ratio. dat
Ratiotempfile/home/kaoyan/ratio. tmp

In the corresponding Add in settings

Userratio ftp1 0 0 2 1000

# Userratio "User Account" fileratio filequota byteratio bytequota
# Fileratio: file-based ratio, which is usually not limited. Therefore, it is 0.
# Filequota: sets the number of files that can be downloaded by default. The value is 0 if no limit is set.
# Byteratio: indicates the upload/download ratio. If the number is 2, it indicates.
# Bytequota: sets the number of Kbytes files that can be downloaded by default.
# The above setting is the ratio. By default, only 1 MB of files can be downloaded.

OK. Restart the instance and enable the upload/download ratio for ftp1.

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.