
簡単な質問です。この構成では、匿名 FTP ユーザーを許可します。
ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
Port 2121
Umask 022
MaxInstances 30
User ftp
Group ftp
SystemLog /var/log/proftpd.log
TransferLog /var/log/xferlog
PassivePorts 49152 65535
UseFtpUsers off
<Directory /*>
AllowOverwrite on
</Directory>
<Limit LOGIN>
AllowUser ftp
AllowUser anonymous
DenyAll
</Limit>
<Anonymous ~ftp>
RequireValidShell off
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 50
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayChdir .message
# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>
# An upload directory that allows storing files but not retrieving
# or creating directories.
</Anonymous>
しかし、使用
ftp localhost 21
私の質問は:匿名のみを許可するようにユーザーログインを完全に無効にする方法は?私はこのような答えが欲しい。
"sorry ftp server is only anonymous"
答え1
から引用ProFTPD: 構成制限
ウェブサイトが匿名アクセスのみを許可している場合はどうなりますか?これは、上記のようにLOGINコマンドグループを使用して設定できます。
<Limit LOGIN>
DenyAll
</Limit>
<Anonymous ~ftp>
<Limit LOGIN>
AllowAll
</Limit>
...
</Anonymous>
このセクション
<Limit>
以外の誰もが<Anonymous>
アクセスを拒否されます。ただし、この<Anonymous>
セクションには、<Limit>
誰もがログインできるようにするセクションがあります。匿名ログインは許可されますが、匿名ではないログインは拒否されます。
PS Sorry.msgファイルに「Sorry ftp server is anonymous only」というテキストを使用して、別の外部セクションを作成できますDisplayLogin sorry.msg
。<Anonymous>