Pure-ftpd

2008.08.28 02:31

sukhyun 조회 수:32170

내 서버에 적용하기 위한 컴파일 옵션과 기능들에 대한 정리

  ------------------------ ENABLING VIRTUAL USERS ------------------------
 
 
Of course, to use virtual users, you have to enable their support in the FTP
server itself. At compile-time, this is done by giving --with-puredb to
./configure (--with-everything also enables it and binary packages have it
compiled in) .

Then, add this switch to your usual pure-ftpd switches:

-l puredb:/path/to/puredb_file

If long options are enabled, you can also use --login instead of -l .

Let's run the server with automatic creation of home directories and puredb
authentication:

/usr/local/sbin/pure-ftpd -j -lpuredb:/etc/pureftpd.pdb &

Try to 'ftp localhost' and log in as joe.



   ------------------------ ADVANCED COMPILATION ------------------------

--with-everything: build a big server with almost all features turned on:
altlog, cookies, throttling, ratios, ftpwho, upload script, virtual users
(puredb), quotas, virtual hosts, directory aliases, external authentication
and Bonjour.


--with-ftpwho: support for the 'pure-ftpwho' command. Enabling this feature
needs some extra memory. Better use it when the server is run in standalone
mode. It can be way slower in inetd mode.


--with-language=korean


--with-largefile: support downloading of files larger than 2 gigabytes on
32-bit architectures. Transfering so huge files through FTP is a strange
idea. And your filesystem has to support it. Your kernel and your libc as
well. And of course, the FTP client has to be safe against large files, too.
And when this feature is enabled, downloads can be a bit slower (or more
cpu-intensive) than without it, due to a limitation of actual Linux kernels.
To summarize: don't enable this for fun, just if you are really planning to
download files over 2 gigabytes.


--with-peruserlimits: enable per-user concurrency limits. Avoid this
on very loaded servers.


--with-puredb: support virtual users, ie. a local users database,
independent of your system accounts. Please read the README.Virtual-Users
file for more info about virtual users.


--with-quotas: enable virtual quotas. With virtual quotas, you can restrict
the maximal number of files an user can store in his account. You can also
of course restrict the total size. See the "quotas" section later in this
document.


--with-ratios: support upload/download ratios, to please w4r3z fr34k2.


--with-throttling: support bandwidth throttling (see below).


--with-virtualchroot: usually, when an user is chrooted (-A and -a
options), it's impossible to go out of his home directory. Enabling that
feature makes it possible: symbolic links are always followed, even if they
are pointing to directories not located in the user's home directory. This
is very useful for having shared directories (for instance, have a symbolic
link to /var/incoming in every home directory) .
This feature isn't enabled by default.



    ------------------------ CHARSETS (RFC2640) ------------------------
       

Since version 1.0.21, pure-ftpd has *experimental* support for charsets
conversion. The server filesystem can use a different charset than the
charset assumed by clients, and pure-ftpd translates file names through the
iconv library.

Some modern clients like lftp will also try to use UTF-8 if the server
supports it.

Thus, charsets conversion can be very useful when dealing with file names
containing non-english characters.

In order to support this, pure-ftpd has to be compiled with:

./configure ... --with-rfc2640

This is not supported by default because it requires libiconv.

Then the server has to be started with --fscharset=<charset>. Replace
<charset> with the charset of the server's filesystem. For instance:

/usr/local/sbin/pure-ftpd --fscharset=ISO-8859-15

This is often enough to properly work with UTF-8 capable clients.

But optionnally, you can specify the default charset for clients, with
--clientcharset:

/usr/local/sbin/pure-ftpd --fscharset=iso-8859-15 --clientcharset=big5





./configure --with-everything --with-language=korean --with-largefile --with-peruserlimits --with-puredb --with-quitas --with-ratios --with-throttling --with-virtualchroot --with-rfc2640

make install-strip


사용자 로그인