基于FreeBSD5.4全能服务器安装
安装FTP服务器
#############################安装ftp服务器pure-ftpd#############################
cd /usr/ports/ftp/pure-ftpd
ee /usr/ports/ftp/pure-ftpd/Makefile
添加
--with-everything \
--with-paranoidmsg \
--with-virtualchroot \
--with-tls \
--with-largefile \
--with-welcomemsg \
--with-uploadscript \
--with-cookie \
--with-virtualhosts \
--with-virtualroot \
--with-diraliases \
--with-quotas \
--with-sysquotas \
--with-ratios \
--with-ftpwho \
--with-throttling \
--sysconfdir=${PREFIX}/etc
make WITH_MYSQL=1 \
WITH_LANG=simplified-chinese
make install
make clean
make rmconfig
cd /usr/local/etc
cp pureftpd-mysql.conf.sample pureftpd-mysql.conf
cp pure-ftpd.conf.sample pure-ftpd.conf
ee /usr/local/etc/pure-ftpd.conf
安装参数详解
--with-everything: 编译一个几乎所有特性都开启的“大”服务器。
--with-paranoidmsg: 当该参数被开启,不论何种原因登录失败都将显示同样的信息给用户。不开启该参数是,密码问题将显示“验证失败”,被禁止用户将显示“对不起,我不信任你”。
--with-virtualchroot:通常一个用户使用chrooted(使用-A 和 -a 参数)命令不会转出他的home目录。开启该功能之后将使其成为可能:符号连接总是一起作用,甚至他们指向的目录不在用户的home目录内。这对于共享路径是一个非常拥有的功能(例如,每一个home目录下都有一个符号连接到/var/incoming)。该功能默认不开启。
--with-tls \
--with-largefile: 支持在32位架构下下载大于2 gigabytes 的文件。通过FTP传输一个如此之大的文件是一个较为奇怪的主意。并且你的文件系统,你的系统内核、你的FTP客户端也需要支持才行。并且当该功能被开启后,下载将会比不开启变慢(或需要耗费更多的CPU)。简单的说,不要应为好玩而开启该功能,除非你真的计划下载大于gigabytes的文件。
--with-welcomemsg: (为兼容)其它FTP服务器pure-ftp可以阅读 welcome.msg 。这是一个安全的缺陷(匿名用户可以上载welcome.msg文件到随机显示)。Pure-ftpd 默认使用 .banner文件。
--with-uploadscript: 自从0.98版开始, Pure-FTPd 开始关注上传。当一个上传成功完成之后,任何额外的程序或脚本可以被自动启动。该功能需要一个称为“pure-uploadscript”的程序安装在Pure-FTPd包内。
--with-cookie: 在用户登录的时候显示随机或定制的信息。
--with-virtualhosts: 支持虚拟主机。这意味着每个IP地址可以有不同的匿名FPT区域。如果服务器只有一个IP地址,就不需要该功能。但是如果有多个IP地址,并且需要一个客户端连接到IP xxx 去获得/etc/pure-ftpd/xxx/而不是~ftp/,就可以开启该功能。
--with-virtualroot \ //虚拟root支持
--with-diraliases: 支持路径的别名。
--with-quotas: 开启虚拟限额,可以限制一个用户可以在他的帐号下存储的最大数字,也可以限制总的大小。
--with-sysquotas: 支持系统限额(非Pure-ftpd的虚拟限额)。只有在计划使用系统限额的时候启用。
--with-ratios: 支持上传/下载比。
--with-ftpwho: 支持pure-ftpwho 命令。开启这个功能需要额外的内存。当pure-ftp运行在standalone模式时比较好,在inetd模式下启用较慢。
--with-throttling: 支持带宽限制。
其它参数
--with-altlog: 除了系统输出,还支持一些特殊的文件格式,目前已实现了:CLF, Stats, W3C 和 xferlog 格式
CLF (通用日志格式)是Apache, WebFS, Roxen以及其它最常用 web 服务器的基本格式;该日志文件仅仅记录文件传输,可以被web流量统计软件(Analog, Webalizer, etc.) 所分析。Stats格式是一种专门为日志文件分析软件设计的特殊输出格式。W3C格式是一种商业日志分析软件(所有支持IIS日志的分析器)的标准格式。 Xferlog 是一种源于wu-ftpd的格式。
--with-brokenrealpath: 一些 Solaris 版本中realpath()运行不可靠。如果altlog和(或)pure-uploadscript没有很好的运行,请用这个参数重新编译。
--with-certfile=: 该file用来做SSL认证,默认为 /etc/ssl/private/pure-ftpd.pem .
--with-extauth: 支持额外的校验模块。大多数用户不需要此参数。.
所支持语言
--with-language=english
--with-language=german
--with-language=romanian
--with-language=french
--with-language=polish
--with-language=spanish
--with-language=danish
--with-language=italian
--with-language=brazilian-portuguese
--with-language=slovak
--with-language=dutch
--with-language=korean
--with-language=swedish
--with-language=norwegian
--with-language=russian
--with-language=traditional-chinese
--with-language=simplified-chinese
--with-language=hungarian
--with-language=catalan
--with-language=czech: change the language of server messages.
默认为英语。
--with-ldap: 支持原始的LDAP路径。当该功能被开启,系统帐号将被忽略。你同时需要使用OpenLDAP。如果OpenLDAP被安装在一个特定的位置,你可以使用--with-ldap= 的参数。
--with-minimal: 为了有效运用现代FTP客户端的功能,Pure-FTPd采用基本的FTP协议加扩展(SITE IDLE,SITE CHMOD, MLSD, ...)的方式 。使用 --with-minimal 参数,这些扩展间不会被编译。同样的,也就不会有standalone server, 不会有lookup for user/group names, 不会有 humor也不会有 ASCII 的支持。但是执行文件将会比默认安装更小。该参数你至少需要GCC 3.3 以上来编译。如果你还想减少(执行)文件大小,可以采用--without-globbing 关联--with-minimal参数。如果你建立一个嵌入系统,可以这样使用;在其它场合,为了避免客户的抱怨(特别是使用windows客户端的客户),请忘记它吧
--with-mysql: 使用MySQL来提供用户数据库。当开启该参数,系统帐号被忽略。使用该功能MySQL 客户端的库文件将被安装。如果MySQL安装在特殊位置,可以使用--with-mysql= 语法。
--with-nonroot: 设置服务以非root特权用户启动。任何普通用户都可以运行服务。这对于在服务器上只有一个受限帐号的情况非常有用。但是一些特性将不能使用,而且密码只能通过LDAP,SQL或PureDB进行校验。当虚拟 chroot 被开启,用户将被限制在服务启动的目录。这是一种不安全的模式,一般用于普通(非root)用户建立临时性的服务器。在standalone模式下, 2121端口将被侦听。如果想采用nonroot模式,需要编译并安装该软件(./configure --prefix=... && make install-strip) . /sbin, /bin and /man 目录需要被写入 prefix,同时还需要增加运行pure-ftpd用户在 /etc 目录的读写权限。
--with-pam: 使用紧密校验模式。Dont use this option if your login/passwd pairs are always refused (but the real fix would be to
fix your PAM configuration). 需要创建一个 /etc/pam.d/pure-ftpd 文件来运用PAM校验。pam 路径中包含该文件的一个样本。
--with-peruserlimits: 开启每用户同时在线限制,在繁忙的服务器上避免该参数。
--with-pgsql: 使用 Postgres 提供用户数据库。当开启该参数,系统帐号将被忽略,Postgres客户端库将被安装。如果Postgres安装与特殊位置,可以使用--with-pgsql= 语法。
--with-probe-random-dev: Pure-FTPd 使用 /dev/arandom, /dev/urandom 或者/dev/random 设备来提供严格的随机数字。这些设备通常在编译时被探测。如果想编译一个二进制包在其它主机上运行,该参数将在运行时被探测。该参数在Linux和BSD 系统上无效,但可以使用在Solaris 和 QNX上。
--with-puredb: 支持虚拟用户,一个本地的用户数据库,不用于系统帐号。
--with-boring: 显示 "professionnal-looking" 信息。
--with-privsep: 开启权限分离。
--withrendez-vous: 允许在MacOS X上支持Rendezvous。
--without-ascii: 不支持 7-bits 传输 (ASCII)。如果有客户使用windows客户端程序发送脚本和HTML文件,不要使用 该参数或让他们对你大叫。
--without-banner: 不使用初始标语,这是一种通过隐瞒获得的愚蠢的安全。
--without-capabilities: 如果性能库 (libcap) 被找到,Pure-FTPd 将使用其提供安全性。该参数不测试这个库是否存在。如果性能库没有正常工作,可以到ftp: //ftp.kernel.org/pub/linux/libs/security/linux-privs/ 下载。
--without-globbing: 不包括全局代码。能够减少内存消耗但经常不能工作。大多数用户不需要使用--without-globbing。Globbing是一个不错的功能。
--without-humor: 如果你没有查看过源代码而使用这个参数,就只好祝你幸运了。
--without-inetd: 如果Pure-FTPd总是运行在standalone模式下,这个参数可以节约一些代码字节。不要同时使用 --without-inetd和
--without-standalone参数,可能会导致服务不能运行。这些参数在Pure-FTPd的二进制分发包上都没有使用,所以inetd和standalone都被支持。
--without-iplogging: 为了保守机密而不记录任何IP地址,除非是政治敏感的服务器。
--without-nonalnum: 非法文件名检查。只支持基本的字符。不要盲目的使用这个参数,或者接受用户的抱怨。
--without-unicode: 不接受非拉丁字符。如果服务器文件名不含特殊字符则推荐使用。
--without-sendfile: 在Linux, Solaris, HPUX 和 FreeBSD 内核, Pure-FTPd采用特殊系统调用(sendfile)尝试减少CPU和内存的使用。在大多数文件系统中该方式运行良好,但该优化并不能在所有文件系统中正常工作。用户曾经报告过SMBFS(Samba)在FreeBSD以及TmpFS和NTFS在Linux(服务器报告错误为“broken pipe”或“Error during write to data connection”)上通过Pure-FTPd下载文件失败。如果计划在上述文件系统中运行服务,就不得不使用
--without-sendfile 参数来定义一个工作区。同样来自PA-Risc Linux 的系统也需要这个参数。
--without-shadow: 忽略shadow密码,即使他们被自动探测到。这通常是一个坏主意,除非使用的是PAM, LDAP 或 SQL。Pure-FTPd 支持shadow密码有效期 (包括帐号和密码)。.
--without-standalone: FTP 服务器能够正常地以 standalone 模式运行(没有任何超级服务)。如果不需要该功能并且想要节省一些代码字节的话,就可以开启该参数。一个类似于g2s, xinetd或tcpserver 的超级服务将强制运行该服务,但是推荐使用standalone模式。
--without-usernames: 从不在在路径列表里输出用户和组名,而代之以UIDs和GIDs。这将提高安全和性能,但会有用户觉得不够友好。
--without-capabilities: 如果性能库 (libcap) 被找到,Pure-FTPd 将使用其提供安全性。该参数不测试这个库是否存在。如果性能库没有正常工作,可以到ftp: //ftp.kernel.org/pub/linux/libs/security/linux-privs/ 下载。
--without-usernames: 从不在在路径列表里输出用户和组名,而代之以UIDs和GIDs。这将提高安全和性能,但会有用户觉得不够友好。
"--prefix=" 改变安装路径,默认为 "/usr/local/".
配置文件详解
pure-ftpd.conf
ChrootEveryone yes
chroot每一个用户,等同于Proftpd 中的DefaultRoot~ , 可以限制用户在某个地方活动,增强服务器的安全性。使用户不能通过cd命令进入上一级目录。
TrustedGID 50
#以上两者要一起用
BrokenClientsCompatibility no
MaxClientsNumber 50
#最大链接数
Daemonize yes
#Fork in background 以守护进程方式在后台运行
MaxClientsPerIP 5
#每个ip最多链接数,最好设小点。
VerboseLog no
#是否要把所有client端的指令都log下来
DisplayDotFiles no
#显示开头的文件
AnonymousOnly no
#是否只让匿名登录
NoAnonymous no
#不开放匿名登入
SyslogFacility ftp
#应该是对日志做一下过滤 (auth, authpriv, daemon, ftp, security, user, local*)可以让日志只记录想要的信息
DontResolve yes
#不反向解释客户端的ip
MaxIdleTime 5
#最大闲置時間
#LDAPConfigFile /usr/local/pureftpd/etc/pureftpd-ldap.conf
#使用LDAP认证,
MySQLConfigFile /usr/local/pureftpd/etc/pureftpd-mysql.conf
#使用MySQL认证
#PGSQLConfigFile /usr/local/pureftpd/etc/pureftpd-pgsql.conf
#使用PGSQL认证
#PureDB /ftp/etc/pureftpd.pdb
#使用者资料的DB存放地点 [由于我是用PureFTPD的內建DB.固有此选项]
#ExtAuth /var/run/ftpd.sock
#pure-authd socket 路径 (详细请看 README.Authentication-Modules)
#PAMAuthentication yes
#开启PAM认证
#UnixAuthentication yes
#如果你想要有简单的Unix(/etc/passwd)的认证的話
FortunesFile /usr/local/pureftpd/etc/.welcome
#显示的欢迎信息文件,你可以创建该文件,输入一些文字,然后你重启你的FTP服务,就会有意外的发现。
LimitRecursion 2000 8
#ls最多列出3000个文件.最深8层
AnonymousCanCreateDirs no
#匿名用户可以创建目录
MaxLoad 4
#当system load超过4時.使用者将不能再下载
PassivePortRange 30000 50000
#被动连接应答范围
ForcePassiveIP 192.168.0.1
#
AnonymousRatio 1 10
#Anonymous连接上传/下载比率
UserRatio 1 10
#用户上传/下载比率(注:如果使用ldap,mysql,pgsql,pam不要启用该功能,否则你在ldap等中设置的Ratio无校)
AntiWarez no
#上传的文件不能被下载(owner is ftp).等到local admin确认
Bind 127.0.0.1,8021
#要绑定和ip/port,在你的系统中有两个FTP Server这样你其中一个FTP就要使用其它端口。
#格式-> 127.0.0.1,21 如果只写port表All ip,port
AnonymousBandwidth 8
#Anonymous 带宽,单位KB/s
UserBandwidth 8
#用户带宽,单位KB/s
Umask 133:022
#上传文件的Umask.(: )
MinUID 1000
# UID至少多少才能登录
AllowUserFXP yes
#支不支持FXP
AllowAnonymousFXP no
#Anonymous支不支持FXP
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
#(”.”)开头的文件能不能被读/写,UNIX Like下以点开头的文件是隐藏文件ls –a才能列出
#Pureftpd Quota模式下做产生” .ftpquota”文件。
AutoRename no
#上传文件若有相同文件名自动改名(file.1,file.2...)
AnonymousCantUpload no
#匿名用户上传文件
TrustedIP 10.1.1.1
#锁IP.
LogPID
#Log文件添加PID
AltLog stats:/ftp/etc/log/pureftpd.log
#log存放地点,注日志有几种常用的格式
#clf 类似apache格式,stats UNIX log格式,w3c 标准W3C格式,可能是HTML格式
NoChmod yes
#不给Chmod指令的权限
KeepAllFiles no
#使用者可续传.但不可刪除文件
CreateHomeDir yes
#如果user的home不存在自动建立(我把这个设为YES)
Quota 1000:10
#Quota <文件数>:<容量Megabytes >,FTP限制10M空间,可以上传1000个文件(注:如果使用ldap,mysql,pgsql,pam不要启用该功能,否则你在ldap等中设置的Quota无校)
PIDFile /ftp/etc/log/pure-ftpd.pid
#记录pure-ftpd的PID文件
CallUploadScript yes
#呼叫UploadScript
MaxDiskUsage 99
#当硬盘使用率到多少時将停止上传
NoRename yes
#用户不能重命名文件名
CustomerProof yes
PerUserLimits 3:20
#<每个账号最多可登入几次:Anonymous最多可同時登入几次>
pureftpd-mysql.conf
MYSQLServer 127.0.0.1
#MYSQL服务器的 IP
MYSQLPort 3306
#MYSQL 端口号
MYSQLSocket /var/lib/mysql/mysql.sock
#使用UNIX.sock本地连接
注:MYSQLServer 与 MYSQLSocket 选择一种即可
MYSQLUser ftp
#MYSQLUser 数据用户名
MYSQLPassword 123456
#MYSQL数据库用户的密码
MYSQLDatabase ftpusers
#FTP数据数据库
MYSQLCrypt md5
#密码加密方式"cleartext", "crypt", "md5" and "password"
# cleartext 明文,crypt,md5,password是Backend password(‘your-passwd’)函数(MYSQL数据库所使用的password()函数)
MYSQLGetPW SELECT Password FROM users WHERE User="\L"
# 密码字段,我使用users表中的Password做为密码字段
MYSQLGetUID SELECT Uid FROM users WHERE User="\L"
#UID用户ID字段
MYSQLDefaultUID 1000
#默认的UID (注:如何开启该选项,MYSQLGetUID将失去作用)
MYSQLGetGID SELECT Gid FROM users WHERE User="\L"
#GID组ID字段
MYSQLDefaultGID 1000
#默认的GID (注:如何开启该选项,MYSQLGetGID将失去作用)
MYSQLGetDir SELECT Dir FROM users WHERE User="\L"
#FTP用户目录如/home/web/www-9812-net
MySQLGetQTAFS SELECT QuotaFiles FROM users WHERE User="\L"
#磁盘限额,文件数限制。如1000,允许用户上传1千个文件
MySQLGetQTASZ SELECT QuotaSize FROM users WHERE User="\L"
#磁盘限额,FTP用户空间限制(单位为M),如:100M
MySQLGetRatioUL SELECT ULRatio FROM users WHERE User="\L"
MySQLGetRatioDL SELECT DLRatio FROM users WHERE User="\L"
#上传/下载比率。MySQLGetRatioUL为上传比,MySQLGetRatioDL下载比。如:1:5
MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L"
MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L"
#下传/下载带宽(单位KB/s)。MySQLGetBandwidthUL上传带宽,MySQLGetBandwidthDL下载带宽。如上传500KB/s,下载50KB/s
MySQLForceTildeExpansion 1
MySQLTransactions On
配置文件实例
pure-ftpd.conf配置文件
###############################################################################
# #
# Configuration file for pure-ftpd wrappers #
# #
###############################################################################
# If you want to run Pure-FTPd with this configuration
# instead of command-line options, please run the
# following command :
#
# /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
#
# RPM binary files use another configuration file by default :
# /etc/sysconfig/pure-ftpd
#
# Please dont forget to have a look at documentation at
# http://www.pureftpd.org/documentation.html for a complete list of
# options.
# Cage in every user in his home directory
ChrootEveryone yes
# If the previous option is set to "no", members of the following group
# wont be caged. Others will be. If you dont want chroot()ing anyone,
# just comment out ChrootEveryone and TrustedGID.
# TrustedGID 100
# Turn on compatibility hacks for broken clients
BrokenClientsCompatibility no
# Maximum number of simultaneous users
MaxClientsNumber 50
# Fork in background
Daemonize yes
# Maximum number of sim clients with the same IP address
MaxClientsPerIP 8
# If you want to log all client commands, set this to "yes".
# This directive can be duplicated to also log server responses.
VerboseLog no
# List dot-files even when the client doesnt send "-a".
DisplayDotFiles yes
# Dont allow authenticated users - have a public anonymous FTP only.
AnonymousOnly no
# Disallow anonymous connections. Only allow authenticated users.
NoAnonymous no
# Syslog facility (auth, authpriv, daemon, ftp, security, user, local*)
# The default facility is "ftp". "none" disables logging.
SyslogFacility ftp
# Display fortune cookies
# FortunesFile /usr/share/fortune/zippy
# Dont resolve host names in log files. Logs are less verbose, but
# it uses less bandwidth. Set this to "yes" on very busy servers or
# if you dont have a working DNS.
DontResolve yes
# Maximum idle time in minutes (default = 15 minutes)
MaxIdleTime 15
# LDAP configuration file (see README.LDAP)
# LDAPConfigFile /etc/pureftpd-ldap.conf
LDAPConfigFile /usr/local/pureftpd/etc/pureftpd-ldap.conf
# MySQL configuration file (see README.MySQL)
# MySQLConfigFile /etc/pureftpd-mysql.conf
MySQLConfigFile /usr/local/pureftpd/etc/pureftpd-mysql.conf
# Postgres configuration file (see README.PGSQL)
# PGSQLConfigFile /etc/pureftpd-pgsql.conf
PGSQLConfigFile /usr/local/pureftpd/etc/pureftpd-pgsql.conf
# PureDB user database (see README.Virtual-Users)
# PureDB /etc/pureftpd.pdb
PureDB /usr/local/pureftpd/etc/pureftpd.pdb
# Path to pure-authd socket (see README.Authentication-Modules)
# ExtAuth /var/run/ftpd.sock
# If you want to enable PAM authentication, uncomment the following line
# PAMAuthentication yes
# If you want simple Unix (/etc/passwd) authentication, uncomment this
# UnixAuthentication yes
# Please note that LDAPConfigFile, MySQLConfigFile, PAMAuthentication and
# UnixAuthentication can be used only once, but they can be combined
# together. For instance, if you use MySQLConfigFile, then UnixAuthentication,
# the SQL server will be asked. If the SQL authentication fails because the
# user wasnt found, another try # will be done with /etc/passwd and
# /etc/shadow. If the SQL authentication fails because the password was wrong,
# the authentication chain stops here. Authentication methods are chained in
# the order they are given.
# ls recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth
LimitRecursion 2000 8
# Are anonymous users allowed to create new directories ?
AnonymousCanCreateDirs no
# If the system is more loaded than the following value,
# anonymous users arent allowed to download.
MaxLoad 4
# Port range for passive connections replies. - for firewalling.
# PassivePortRange 30000 50000
# Force an IP address in PASV/EPSV/SPSV replies. - for NAT.
# Symbolic host names are also accepted for gateways with dynamic IP
# addresses.
# ForcePassiveIP 192.168.0.1
# Upload/download ratio for anonymous users.
# AnonymousRatio 1 10
# Upload/download ratio for all users.
# This directive superscedes the previous one.
# UserRatio 1 10
# Disallow downloading of files owned by "ftp", ie.
# files that were uploaded but not validated by a local admin.
AntiWarez yes
# IP address/port to listen to (default=all IP and port 21).
# Bind 127.0.0.1,21
Bind 127.0.0.1,8021
# Maximum bandwidth for anonymous users in KB/s
# AnonymousBandwidth 8
# Maximum bandwidth for *all* users (including anonymous) in KB/s
# Use AnonymousBandwidth *or* UserBandwidth, both makes no sense.
# UserBandwidth 8
# File creation mask. : .
# 177:077 if you feel paranoid.
Umask 133:022
# Minimum UID for an authenticated user to log in.
MinUID 100
# Allow FXP transfers for authenticated users only.
AllowUserFXP yes
# Allow anonymous FXP for anonymous and non-anonymous users.
AllowAnonymousFXP no
# Users cant delete/write files beginning with a dot (.)
# even if they own them. If TrustedGID is enabled, this group
# will have access to dot-files, though.
ProhibitDotFilesWrite no
# Prohibit *reading* of files beginning with a dot (.history, .ssh...)
ProhibitDotFilesRead no
# Never overwrite files. When a file whoose name already exist is uploaded,
# it get automatically renamed to file.1, file.2, file.3, ...
AutoRename no
# Disallow anonymous users to upload new files (no = upload is allowed)
AnonymousCantUpload no
# Only connections to this specific IP address are allowed to be
# non-anonymous. You can use this directive to open several public IPs for
# anonymous FTP, and keep a private firewalled IP for remote administration.
# You can also only allow a non-routable local IP (like 10.x.x.x) to
# authenticate, and keep a public anon-only FTP server on another IP.
#TrustedIP 10.1.1.1
# If you want to add the PID to every logged line, uncomment the following
# line.
#LogPID yes
# Create an additional log file with transfers logged in a Apache-like format :
# fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338
# This log file can then be processed by www traffic analyzers.
# AltLog clf:/var/log/pureftpd.log
# Create an additional log file with transfers logged in a format optimized
# for statistic reports.
# AltLog stats:/var/log/pureftpd.log
#AltLog stats:/var/log/pureftpd.log
# Create an additional log file with transfers logged in the standard W3C
# format (compatible with most commercial log analyzers)
# AltLog w3c:/var/log/pureftpd.log
# Disallow the CHMOD command. Users cant change perms of their files.
#NoChmod yes
# Allow users to resume and upload files, but *NOT* to delete them.
#KeepAllFiles yes
# Automatically create home directories if they are missing
#CreateHomeDir yes
# Enable virtual quotas. The first number is the max number of files.
# The second number is the max size of megabytes.
# So 1000:10 limits every user to 1000 files and 10 Mb.
#Quota 1000:10
# If your pure-ftpd has been compiled with standalone support, you can change
# the location of the pid file. The default is /var/run/pure-ftpd.pid
#PIDFile /var/run/pure-ftpd.pid
# If your pure-ftpd has been compiled with pure-uploadscript support,
# this will make pure-ftpd write info about new uploads to
# /var/run/pure-ftpd.upload.pipe so pure-uploadscript can read it and
# spawn a script to handle the upload.
#CallUploadScript yes
# This option is useful with servers where anonymous upload is
# allowed. As /var/ftp is in /var, it save some space and protect
# the log files. When the partition is more that X percent full,
# new uploads are disallowed.
MaxDiskUsage 99
# Set to yes if you dont want your users to rename files.
#NoRename yes
# Be customer proof : workaround against common customer mistakes like
# chmod 0 public_html, that are valid, but that could cause ignorant
# customers to lock their files, and then keep your technical support busy
# with silly issues. If youre sure all your users have some basic Unix
# knowledge, this feature is useless. If youre a hosting service, enable it.
CustomerProof yes
# Per-user concurrency limits. It will only work if the FTP server has
# been compiled with --with-peruserlimits (and this is the case on
# most binary distributions) .
# The format is : :
# For instance, 3:20 means that the same authenticated user can have 3 active
# sessions max. And there are 20 anonymous sessions max.
# PerUserLimits 3:20












文章评论
共有 0 位网友发表了评论 此处只显示部分留言 点击查看完整评论页面