Proftpd learning note (2)

zhaozj2021-02-16  51

Proftpd learning note (2)

Last time we told Proftp's basic installation, because we have the settings about MySQL and Quota, so compile the corresponding modules when you compile, if you don't need mysql and disk quota, you can do it without this Compilation.

Here is a very practical order,

/ usr / local / proFTPD / SBIN / FTPSHUT

This command is still more practical, because you may need to constantly adjust your server, this command is very flexible, you can stop FTP connections in the premise without stopping the processpd process, here will tell how it is used in detail .

FTPSHUT [-L min] [-d min] Time [Warning-Message ...]

-l min: In a few minutes before the FTP closes the service, try to create a new FTP connection is not accepted - Dim: In a few minutes before the FTP shutdown service, the established FTP connection will be aborted Time: How much is After the time, the server will turn off the FTP service, and there are two types of Number after the Number minutes after the format. MMHH is turned off today.

Note that here we use this command to stop the FTP service, but the actual proFTPD process has not stopped, so the general debug FTP will use this command.

Example: After 30 minutes, the FTP service will be closed, and no new FTP connection is unacceptable before this, which has been built 10 minutes before the service is closed, and "FTP Server Will Shutdown is displayed on the client. AT Time

FTPSHUT -L 20 -D 10 30 "FTP Server Will Shutdown At Time"

In fact, FTPSHUT is generating / etc / shutmsg, you only need to delete this file FTP and you can reply, or directly

FTPSHUT -R

Ok, I started telling some of the basic configuration of PrOFTPD. In fact, if you are familiar with the configured configuration of Apache, you will find that the PROFTPD setting is basically similar, its configuration basic format is

#Global Settings

Set item 1 parameter 1

Setting item 2 parameter 2

# 一 目 目 设置 ......

# 关于 关于 的 名 的 用户 的 设置 用户 ">" ...

What we use may be the use of Limit. Limit has the following movements, which is basically able to cover all permissions. Everyone is flexible.

CMD: Change Working Directory Change Directory

MKD: Make Directory to establish permissions for the directory

RNFR: Rename from changes permissions for directory names

Dele: Delete deletes permissions

RMD: Remove Directory Delete Permissions for Directory

Retri Retrieve Permissions from the server to the client

STOR: Store is transferred from the client to the server

Read: readable permissions, excluding the permissions of the column directory, equivalent to RETR, STAT, etc.

WRITE: Permissions for writing files or directories, including MKD and RMD

DIRS: Whether to allow column directories, equivalent to license such as List, NLST, or more practical all: All permissions

Login: Whether to allow the license to log in

In response to the object applied above this, including the following range

ALLOWUSER allows for a user-allowed LIMIT

Denyuser is for a user-prohibited Limit

ALLOWGROUP allows for a user group Allowed Limit

DenyGroup is forbidden for a user group

ALLOWALL allows for all user groups

Denyall is for all users prohibited Limit

The parameters regarding the limit rate are:

TransferRate Stor | Retri Speed ​​(KBytes / S) User User

Below we will explain the configuration of Proftp in example, so that you may be more easily understood.

1. The FTP server supports breakpoints, and the maximum support is 10 people online, each IP only allows a connection; 2. Allows the FTPUsers user group to access their own directory without accessing superiors or other directories; 3. The user does not display the FTP server version information when logging in the server to increase security; 4. Building a Kaoyan's FTP account belongs to the FTPUsers group, Kaoyan users only allow download, no writable permissions. Download rate is limited to 50kBytes / s. 5. Create a UPLOAD user, which belongs to the FTPUsers group, like the host directory of Kaoyan users, allows UPLOAD users to upload files and creation of permissions, but do not allow downloads, and do not allow deletion of directory and file permissions, uploaded rates in 100KBytes / s

First, the previous user and group adds and directory permission settings

Group add ftpusers

Useradd -d / home / kaoyan -g ftpusers -s / bin / falsed kaoyan

UserAdd -d / Home / Kaoyan -g ftpusers -s / bin / falset Upload

Chown -r kaoyan: Upload / Home / Kaoyan

CHMOD -R 775 / HOME / KAOYAN

If you just want users to access users in the FTPUsers group, they can be set to 770. Set /usr/local/proftpd/etc/proftpd.conf

Note # 表示 注 注释, no effect on the settings, can not write

ServerName "Frank's FTP Server"

Servertype Standalone

DefaultServer on

Port 21

Umask 022

MaxInstances 30 # Up to 30 Proftpd PIDs

User Nobody

Group nobody

TimeOutstalled 10

MaxClients 10 # Up to 10 users to be online

MaxClientSperhost 1 "Sorry, an IP only allows a connection"

ALLOWSTORERESTART ON

# Allow breakpoints (upload), breakpoint renewal (download) is the default support, no setup

DisplayLogin Welcome.msg # Welcome word file

ServerIdent Off # Shielded Server Version Information

Defaultroot ~ ftpusers # Set the FTPUsers group can only access your own directory

ALOWOVERWRITE ON # 不 允 d d u k an an an an an 不 允,, d d d d d d d d d d d 下载 d d Limit> Transferrate Retr 50 User Kaoyantransferrate Stor 100 User Upload I implemented here can also pass

...

...

<>

...

...

And more flexible, specifically use that way, see everyone, I just give you a door.

Ok, I will talk about it today, and I will continue to tell other configurations in PROFTP tomorrow.

转载请注明原文地址:https://www.9cbs.com/read-19222.html

New Post(0)