------------------------------------------------------------------------------------freebsd# vi /usr/local/proftpd/etc/proftpd.confServerName "My FTP Server" ServerType standalone DefaultServer on
User nobody Group nogroup # 不要求有合法shell,直接效果是允許nologin用戶和虛擬用戶登錄 RequireValidShell off # 設置用戶驗證順序是先虛擬用戶再本地用戶 AuthOrder mod_auth_file.c mod_auth_unix.c # 指定虛擬用戶數據文件 AuthUserFile /usr/local/proftpd/etc/ftpd.passwd # 指定虛擬組數據文件 AuthGroupFile /usr/local/proftpd/etc/ftpd.group # ***除wheel組外其它所有組只能訪問home目錄內容,這裡wheel需要在ftpd.group中定義 DefaultRoot ~ !wheel # 雖然默認情況root不能ftp,但我仍然顯式地聲明它,也方便隨時開啟這個功能。 RootLogin off <Limit SITE_CHMOD> DenyAll </Limit> <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,禁用匿名FTP MaxClients none "Sorry, anonymous is refused on this site!"
# 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>原文地址:http://kerry.blog.51cto.com/172631/236036