# This is a basic ProFTPD configuration file (rename it to # 'proftpd.conf' for actual use. It establishes a single server # and a single anonymous login. It assumes that you have a user/group # "nobody" and "ftp" for normal operation and anon. ServerName " ServerType standalone DefaultServer on # Port 21 is the standard FTP port. Port 21
# Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable. Umask 022 # To prevent DoS attacks, set the maximum number of child processes # to 30. If you need to allow more than 30 concurrent connections # at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server # that allows you to limit maximum number of processes per service # (such as xinetd). MaxInstances 30
# Set the user and group under which the server will run. User nobody Group nogroup # To cause every FTP user to be "jailed" (chrooted) into their home # directory, uncomment this line. #DefaultRoot ~ DefaultRoot
User 和Group 指定proftpd 进程启动时的有效用户ID,处于安全考虑默认的身份是nobody,有一点要指出的是,一般Red Linux 9.0 中默认是没有nogroup 这个组的,把Group指定为nobody 即可。
# Set the maximum number of seconds a data connection is allowed # to "stall" before being aborted. #TimeoutStalled 300 AllowRetrieveRestart on AllowStoreRestart on # Normally, we want files to be overwriteable. <Directory /> AllowOverwrite on </Directory>
这一部分,将在后面详细介绍。<Anonymous ~ftp> User ftp Group ftp # We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous ftp # Limit the maximum number of anonymous logins MaxClients 10 # We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message # Limit WRITE everywhere in the anonymous chroot <Limit WRITE> DenyAll </Limit> </Anonymous>
#全局设置 设置项目1 参数1 设置项目2 参数2 #某个目录的设置 <Directory "路径名"> ... ... </Directory> #关于匿名登陆的设置 <Anonymous "匿名登陆的目录"> ... ... <Limit 限制动作> ... ... </Limit> </Anonymous>
欢迎您%U, 这是T-force的测试FTP服务器; 目前时间是:%T; 本服务器最多允许%M个用户连接数; 目前服务器上已有%N个用户连接数; 目前你所在的目录是%C; 目录所在的硬盘还剩下%F字节。
# A basic anonymous configuration, no upload directories. If you do not # want anonymous users, simply delete this entire <Anonymous> section. <Anonymous /ftp> #指定匿名用户登录目录 User ftp #指定本块设置的用户 Group ftp #指定本块设置的用户属组 # We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous ftp #设定用户的别名 AnonRequirePassword on #登陆需要密码 # Limit the maximum number of anonymous logins MaxClients 10 # We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message # Limit WRITE everywhere in the anonymous chroot <Directory pub/*> <Limit WRITE DELE RMD MKD READ> DenyAll </Limit> <Limit STOR> AllowAll </Limit> </Directory> </Anonymous>
CMD:Change Working Directory 改变目录 MKD:MaKe Directory 建立目录的权限 RNFR: ReName FRom 更改目录名的权限 DELE:DELEte 删除文件的权限 RMD:ReMove Directory 删除目录的权限 RETR:RETRieve 从服务端下载到客户端的权限 STOR:STORe 从客户端上传到服务端的权限 READ:可读的权限,不包括列目录的权限, 相当于RETR,STAT等 WRITE:写文件或者目录的权限,包括MKD和RMD DIRS:是否允许列目录,相当于LIST, NLST等权限,还是比较实用的
AllowUser 针对某个用户允许的Limit DenyUser 针对某个用户禁止的Limit AllowGroup 针对某个用户组允许的Limit DenyGroup 针对某个用户组禁止的Limit AllowAll 针对所有用户组允许的Limit DenyAll 针对所有用户禁止的Limit
联系客服