Proftpd: total de desativação do login do usuário

0

Uma pergunta simples, com essa configuração eu permito usuários anon 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>

Mas usando

ftp localhost 21

Ele pede senha Minha pergunta é: como desativar totalmente o login do usuário para permitir apenas anônimo? Eu quero uma resposta como esta

"sorry ftp server is only anonymous"
    
por elbarna 15.10.2018 / 23:17

1 resposta

2

Citar ProFTPD: configurar limites

What if a site wished to allow only anonymous access? This would be configured using the LOGIN command group, as above:

<Limit LOGIN>
  DenyAll
</Limit>

<Anonymous ~ftp>
  <Limit LOGIN>
    AllowAll
  </Limit>
  ...
</Anonymous>

The <Limit> section outside of the <Anonymous> section denies logins to everyone. However, the <Anonymous> section has a <Limit> that allows everyone to login; anonymous logins are allowed, and non-anonymous logins are denied.

P.S. Você pode criar uma seção separada DisplayLogin sorry.msg outside <Anonymous> com o texto "sorry ftp server is only anonymous" no arquivo sorry.msg.

    
por 16.10.2018 / 01:57

Tags