|
|
※阅读文章※ |
proftpd看的很迷糊作者:开花石头 [文章出自: www.phpx.com] 谁有写好的配置文件麻烦共享一下,网上的看的很乱 希望有2种方式,在一台机子上实现: 1.匿名 2.根据用户名的不同进入不同的目录 hotfire: # 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 "ProFTPD Default Installation" 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 that the server normally runs at. User nobody Group nobody # Normally, we want files to be overwriteable. <Directory /*> AllowOverwrite on </Directory> # Needed for NIS. PersistentPasswd off #禁止所有用户登录 <Limit LOGIN> DenyAll </Limit> #匿名 # A basic anonymous configuration, no upload directories. <Anonymous /your/anonymous/directory> 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 RequireValidShell off AnonRequirePassword off # We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message #允许ftp,anonymous用户登录本目录 <Limit LOGIN> AllowAll </Limit> <Directory /your/anonymous/directory/upload> #允许ftp,anonymous用户在本目录里浏览和上传 #首先禁止本目录下的所有权限 <Limit ALL> DenyAll </Limit> #开放浏览和写 <Limit WRITE DIRS> AllowAll </Limit> </Directory> </Anonymous> # Default root can be used to put users in a chroot environment. # As an example if you have a user foo and you want to put foo in /home/foo # chroot environment you would do this: # # DefaultRoot /home/foo foo <Anonymous /your/user1/directory> User user1 Group ftptest # Limit the maximum number of anonymous logins # MaxClients 10 RequireValidShell off AnonRequirePassword on <Limit LOGIN> AllowAll </Limit> # # # 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 # HideUser root # HideGroup root <Directory /xxxx?????> #参照上面的设权限 #ALL - 所有的权限 #DIS - 浏览 #STOR - 保存 #WRITE - 改写 #READ - 读 #DELE - 删除 #CWD XCWD CDUP - 目录切换 #RNFR - 重命名 #想设什么权限就在Limit XXX里AllowAll #例子,另一种用法,在允许某个用户在某个目录下有权 #<Directory XXX> # <Limit ALL> # DenyAll # </Limit> # <Limit WRITE> # AllowUser user1 # </Limit> #</Directory> <Limit WRITE> DenyAll </Limit> </Directory> </Anonymous> 论坛原帖 happyBot自动摘抄自喜悦村精华帖,查看原帖获得完整内容 文章加入时间: 2004-11-17 15:11:03 责任编辑: w9 (2611 人次查阅) |