With wu-ftpd FTP server set up
December 15, 2010
ftp2010-12-15 16:39:33 Read 2 Comments 0 Word Count: I. Introduction
when we need to set up a website available for download function, in addition to using the http connect, but can also provide additional services for users to directly connect ftp download. In fact, ftp is a long-standing service, it is designed to transfer data between two computers in order to avoid too many remote execution. If you want to transfer large files, the terms of the way http connections will take up some websites transfer of resources (for example the number of connections), then we should use ftp the. ftp is a TCP / IP-based applications, it is generally to the ftp service will be embedded in the inetd program is executed.
ftp divided into two parts, one is the server-side program, one is the client. Ftp server on Unix program is very large, different operating systems are not the same built-in version, there are common wu-ftpd, proftpd, Trollftpd, ncftpd and Beroftpd and so on. One of the most commonly used is the most popular wu-ftpd, which is originally developed by the University of Washington wuarchive.wustl.edu, is a consideration of efficiency and stability of the program, which provides open source and academic institutions free of charge.
Second, install and configure
wu-ftpd installation is very easy, most versions of Linux are included in the wu-ftpd the rpm package, you can Linux installation specified load. If you want to compile the source code can also go to ftp://ftp.wu-ftpd.org download the latest version of the source code package.
After installation, you can use ckconfig command to check installed correctly. In the / etc / passwd in ftp user can specify the login directory.
wu-ftpd has the following six main configuration file:
ftpaccess (the main configuration file to control access rights)
ftpconvertions (configuration files compression / decompression conversion)
ftpgroups (the group defined its own set ftp)
ftphosts (setting individual user permissions)
ftpservers (set different IP / DomainName to correspond to a different virtual host)
ftpusers (which account can not be used to set ftp connection)
Here we describe each .
⒈ / etc / ftpaccess (wu-ftpd main configuration file)
class – defined group, use the following:
class < Type>
groups defined by the class user can connect in, the class can be used to regulate the multi-layered group of users which up from where. There are three major types, real, anonymous one guest. real if not listed in the definition, then the machine in any real average user can not even come up with their own account. anonymous if not defined, it means there is no account of people not to even up. If you have defined guest, then the guest group of people can come up. Also
classallreal, guest, anonymous *
defines a named all of the class, including three kinds of people, all IP connection users (that is, Everyone including)
classlocalreallocalhostloopback
local this class that only real users can connect from the local machine up
classremoteguest, anonymous *
remote included in this class come from anywhere in the guest and anonymous users, but the real user is not
classrmtuserreal! *. example.com
rmtuser This class contains come from the outside (except example.com) real user
autogroup – automatic mapping group, used as follows:
autogroup [... ... ]
When you defined a class that belong to the user, once the connection is up it will be mapped to a corresponding group below, so you can use the Unix file permissions of a group of people do limit.
deny – deny certain address connection, use the following:
deny
ban some machines connect and display
deny210.62.146 .*: 255.255.255.254/etc/reject.msg
guestgroup – set the visitors group
guestuser – Set the guest account
realgroup – set real group
realuser – set true account
nice – set how much priority given to certain class, usage is as follows:
nice
in Linux, nice values ??is -20 (highest priority) to 19 (last treatment), Here you can specify a negative value to increase the priority class.
defumask – set a class of umask, use the following:
defumask []
umask is set up file permissions of the file mask
tcpwindow – set tcpwindow size
keepalive – set to control whether to use TCPSO_KEEPALIVE break situation
timeout – Set the connection timeout, use the following:
timeoutaccept
accept a connection timeout, default 120 seconds
timeoutconnect < s>
connection establishment timeout, default 120 seconds
timeoutdata
data transfer timeout, default 1200 seconds < br />
timeoutidle
user daze out, default 900 seconds
file-limit – limit of a class can only transfer a few files , usage is as follows:
file-limit [] []
restrict access to files on a class number, include in (upload), out (download) , totalraw behalf of the entire transmission of results, not just data files. For example:
file-limitout20lvfour
limit lvfour this class of users can only download 20 files
byte-limit – limit of a class can only transfer a few bytes, use with file-limit similar
limit-time – limit how long a connection only, usage is as follows:
limit-time {*anonymousguest}
In order to prevent people from hanging on the station for it, you can use this method limit the user on-line time, for example:
limit -timeguest5
allow guest account users can only spend five minutes
limit – limit of a class of several people simultaneously on-line, use the following:
limit
