Figure-ProFTPD
ProftpdCreate a special communication topology (create an ftpguest group! Set all guset in this group!
I think many of my friends are using the FTP website to communicate with other websites! You can give some webmaster some permission limits for the upper and lower sides, and these permission limits can be retained or tired, which is really great! On Windows systems, Server-U is a good guy. Can FTP on Linux support such a function ?! Haha! Proftpd! And the settings are really simple! We need to implement such functions as false settings:
The environments of the master machine, the actual user, and the anonymous are the same as those of the first two regions;
Create a group named ftpguest. If the user points to the group, the root category of the user after logging on to the host is/var/ftp2;
There are three users, ftpuser1, ftpuser2, and ftpuser3, all belong to the ftpguest group. They do not have a category and cannot use ssh, however, they have permission to upload data to/var/ftp2/upload, but cannot obtain information;
The maximum traffic in all associated regions in/var/ftp2 is 50 Kbytes/second;
The upper/lower limit ratio of ftpuser1 is, and the lower limit is 100 MB. The upper/lower limit ratio of ftpuser2 and ftpuser3 is, the quota has 30 MB lower quota;
When a user enters/var/ftp2, the upper/lower limit ratio of the user, the remaining lower limit capacity, and other related information are displayed;
The ratio of the Upper/lower-end ratio related to the user and the remaining lower-end capacity are recorded in/var/ftp2/work/ratio. dat,/var/ftp2/work/ratio. tmp, so the user cannot parse or Parse in this project!
In this case, the most important thing is the ratio of the Upper/lower-end users and the available blank record, in my case,/var/ftp2/work/ratio is used. in dat, please note that this case must be accessed and accessed by ftpuser1, ftpuser2, and ftpuser3! What's really important! Therefore, I should design my settings as follows:
1. create the required group and user:
# I want to create a group named ftpguest. In addition, all related users are in this group!
[Root @ test root] # groupadd ftpguest
[Root @ test root] # useradd-M-g ftpguest-s/bin/false ftpuser1
[Root @ test root] # useradd-M-g ftpguest-s/bin/false ftpuser2
[Root @ test root] # useradd-M-g ftpguest-s/bin/false ftpuser3
[Root @ test root] # passwd ftpuser1
# Create a password for ftpuser1 ftpuser2 ftpuser3 in sequence!
2. Establish the FTP related token:
# The path I want is in/var/ftp2, and ftpguest must be able to access the path again!
[Root @ test root] # mkdir-p/var/ftp2
[Root @ test root] # mkdir-p/var/ftp2/upload
[Root @ test root] # mkdir-p/var/ftp2/work
[Root @ test root] # chmod-R 775/var/ftp2
[Root @ test root] # touch/var/ftp2/work/ratio. dat # The following two cases are used in ratio
[Root @ test root] # touch/var/ftp2/work/ratio. tmp
[Root @ test root] # chown-R ftpuser1: ftpguest/var/ftp2
[Root @ test root] # chmod 666/var/ftp2/work /*
3. establish basic design cases:
[Root @ test root] # vi/usr/local/proftpd/etc/proftpd. conf
# The settings for the host, actual use cases, and anonymous are shown in the first two tips, so I have skipped the settings here!
).....
# Here is the setting of/var/ftp2! It is the setting related to ftpguest!
DefaultRoot/var/ftp2 ftpguest
DisplayLogin welcome. msg
# Start to set the upper/lower limit Ratio
Ratios on
SaveRatios on
RatioFile/work/ratio. dat
RatioTempFile/work/ratio. tmp
# Pay attention to the two cases above! His path is related to DefaultRoot!
# Because our DefaultRoot is at/var/ftp2
# When the root object is/var/ftp2, the path is/work/, that is,/work/ratio. dat
# In fact, it is/var/ftp2/work/ratio. dat (because/is/var/ftp2 OH)
# This is the easiest place to get started! Please read it again! Pai_^
# The bottom-up setting is to make the/var/ftp2/work case useless!
Denyall
# Set the upper/lower limit of the user! Syntax:
# UserRatio "" fileratio filequota byteratio bytequota
# User login history: login history of proftpd!
# Fileratio: this is the "proportion" based on the case, which is usually not limited, so it is 0.
# Filequota
# Byteratio: the ratio of the Upper/lower limit. This number indicates "1: lower limit!
# Bytequota: sets the number of KBytes records that can be deleted! Pay attention to the single bit!
UserRatio ftpuser1 0 0 2 100000 # The Upper/lower ratio is.
UserRatio ftpuser2 0 0 1 30000
UserRatio ftpuser3 0 0 1 30000
# UserRatio ftpuser3 0 0-2 30000
# This line is interesting! When the lower percentage is the lower value, it indicates that the upper/lower ratio is!
Umask 002
# Here is the "lower speed limit!
TransferRate RETR 50 group ftpguest
Denyall
Allowall
4. Create a welcome surface:
# Note that because the root cause of my ftpguest group is/var/ftp2
# Welcome. msg must be placed in/var/ftp2/welcome. msg!
[Root @ test root] # vi/var/ftp2/welcome. msg
Welcome! This is the FTP site of dongge!
My host: % L
Current Time: % T
Maximum memory usage: % M
Current quota limit: % N
Your host: % R
Your bandwidth usage: % U
Current category: % C
5. Repeat the operation!
[Root @ test root] #/etc/rc. d/init. d/xinetd restart
In this way, you can set the settings and use the correct token!
I believe you can also create your own special Proftpd communication account through the five tips of laruence. I hope this article will be useful to you!