pureftpd
pure-ftpd.conf:
1 | # 限制所有用户在其主目录中,change root directory(更改根目录),参考chroot命令 |
请注意:LDAPConfigFile, MySQLConfigFile, PAMAuthentication 和 UnixAuthentication 这些指令只能被使用一次,不过,他们能被混合在一起用。例如:如果你使用了 MySQLConfigFile 和 UnixAuthentication,那么 SQL 服务器将被访问。如果因为用户名未找到而使 SQL 认证失败的话,就会在/etc/passwd 和 /etc/shadow 中尝试另外一种认证,如果因为密码错误而使 SQL 认证失败的话,认证就会在此结束了。认证方式由它们被给出来的顺序而被链接了起来
命令
1 | lujinkai@Z510:/usr/local/pureftpd$ ll bin/ sbin/ |
pure-pw
Manage virtual users files for Pure-FTPd.
Virtual users is a simple mechanism to store a list of users, with their password, name, uid, directory, etc. It’s just like /etc/passwd. But it’s not /etc/passwd. It’s a different file, only for FTP.
It means that you can easily create FTP-only accounts without messing your system accounts.
Additionnaly, virtual users files can store individual quotas, ratios, bandwidth, etc. System accounts can’t do this.
Thousands of virtual users can share the same system user, as long as they all are chrooted, and they have their own home directory.
pure-pwconvert
Generate a virtual users file from system accounts.
This program scans system accounts (/etc/passwd) and outputs a FTP virtual users list, suitable to the pure-pw command.
pure-statsdecode
Show human-readable dates from a “stats” logfile.
This program decodes Pure-FTPd’s “stats” log files and converts timestamps into human-readable dates.
pure-authd
External authentication agent for Pure-FTPd
pure-authd is a daemon that forks an authentication program, waits for an authentication reply, and feed them to an application server.
pure-authd listens to a local Unix socket. A new connection to that socket should feed pure-authd the following structure:
account:xxx
password:xxx
localhost:xxx
localport:xxx
peer:xxx
pure-certd
TLS certificate agent for Pure-FTPd.
pure-certd is a daemon that forks an authentication program, waits for a certificate path as a reply, and returns it to an application server.
pure-certd listens to a local Unix socket. A new connection to that socket should send pure-authd the following structure:
sni_name:xxx end
These content is passed to the authentication program, as an environment variable:
CERTD_SNI_NAME
The authentication program should take appropriate actions to select a TLS certificate, and reply to the standard output with the fol‐lowing format:
action:strict cert_file:/path/to/cert.pem key_file:/path/to/cert.pem end
pure-ftpd
simple File Transfer Protocol server
Pure-FTPd is a small, simple server for the old and hairy File Transfer Protocol, designed to use less resources than older servers,be smaller and very secure, and to never execute any external program.
It support most-used features and commands of FTP (including many modern extensions), and leaves out everything which is deprecated,meaningless, insecure, or correlates with trouble.
IPv6 is fully supported.
pure-ftpwho
Report current FTP sessions.
pure-ftpwho shows current Pure-FTPd client sessions. Only the system administrator may run this. Output can be text (default), HTML, XML data and parser-optimized. The server has to be compiled with –with-ftpwho to support this command.
pure-mrtginfo
provide an MRTG-graphable user count for ftpd.
Pure-Mrtginfo counts the number of clients currently connected to ftpd(8) and output the format in a format graphable by MRTG.
pure-quotacheck
Update virtual quota files for Pure-FTPd.
pure-quotacheck create a .ftpquota file in the specified directory.
This file contains the current file and size of the directory, and it is used by Pure-FTPd when virtual quotas are enabled.
It’s recommended to periodically run pure-quotacheck for every user, in crontabs.
pure-uploadscript
Automatically run an external program after a successful upload.
If Pure-FTPd is compiled with –with-uploadscript (default in binary distributions), and if the -o (or –uploadscript) is passed to the server, a named pipe called /var/run/pure-ftpd.upload.pipe is created. You will also notice an important file called /var/run/pure-ftpd.upload.lock, used for locking.
After a successful upload, the file name is written to the pipe.
pure-uploadscript reads this pipe to automatically run any program or script to process the newly uploaded file.