2

I have problems with one proftpd server. I use two authentication methods, anonymous and user authentication at the same time.

I modified the proftpd.conf to authenticate against the /etc/proftpd/passwd file, but this police prevent authenticate anonymous users, even I set this directive in my proftpd.conf

Please forgive my english, it´s not my native language

What I want is simple, user authentication and anonymous users at the same time

Here's what I've tried:

  # /etc/proftpd/proftpd.conf 
  UseIPv6           off
  IdentLookups         off
  UseReverseDNS        off

  ServerName        "college"
  ServerType        standalone
  DeferWelcome         off

  MultilineRFC2228     on
  DefaultServer        on
  ShowSymlinks         on

  #TimeoutNoTransfer      600
  #TimeoutStalled         600
  #TimeoutIdle         1200

  TimeoutNoTransfer    100
  TimeoutStalled       50
  TimeoutIdle       200

  DisplayLogin                    welcome.msg
  DisplayChdir                  .message true
  ListOptions                   "-l"

  DenyFilter        \*.*/

  RequireValidShell    off

  Port           21

  PassivePorts                  40000 50000
  AuthOrder                     mod_auth_file.c
  AuthUserFile /etc/proftpd/passwd
  AuthGroupFile /etc/proftpd/group

  <IfModule mod_dynmasq.c>
  # DynMasqRefresh 28800
  </IfModule>

  MaxInstances         30

  User           proftpd
  Group          nogroup

  Umask          022  022
  AllowOverwrite       off


  TransferLog /var/log/proftpd/xferlog
  SystemLog   /var/log/proftpd/proftpd.log


  <IfModule mod_quotatab.c>
  QuotaEngine off
  </IfModule>

  <IfModule mod_ratio.c>
  Ratios off
  </IfModule>

  <IfModule mod_delay.c>
  DelayEngine on
  </IfModule>

  <IfModule mod_ctrls.c>
  ControlsEngine        off
  ControlsMaxClients    20
  ControlsLog           /var/log/proftpd/controls.log
  ControlsInterval      5
  ControlsSocket        /var/run/proftpd/proftpd.sock
  </IfModule>

  <IfModule mod_ctrls_admin.c>
  AdminControlsEngine off
  </IfModule>

  Include /etc/proftpd/conf.d/

  DefaultRoot /home/college/ftp

  <Anonymous /home/college/ftp>
     User                   ftp
     Group         nogroup
     UserAlias              anonymous    ftp
     RequireValidShell      off
     MaxClients        50
     <Limit LOGIN>
        AllowAll
     </Limit>
     <Directory /home/college/ftp>
     <Limit WRITE>
     DenyAll
     </Limit>
     </Directory> 
     <Directory /home/college/ftp/upload>
     <Limit WRITE>
     AllowAll
     </Limit>
     </Directory> 
  </Anonymous>
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
brito9112
  • 27
  • 2
  • When you attempt to login anonymously, what does [ProFTPD debug logging, debug level 10](http://www.proftpd.org/docs/howto/Debugging.html) show? – Castaglia Oct 06 '16 at 16:53
  • Respuesta: 220 ProFTPD 1.3.5rc3 Server (College) [x.x.x.x] Comando: USER anonymous Respuesta: 331 Conexión anónima ok, enví­a su email completo como contraseña Comando: PASS ************** Respuesta: 530 Login incorrecto Error: Error crítico Error: No se pudo conectar al servidor – brito9112 Oct 06 '16 at 17:09
  • The level 10 debugging will show _a lot more information than that_ -- including, usually, the reason why the login failed. Perhaps your `AuthUserFile` does not contain an entry for user "ftp"? – Castaglia Oct 06 '16 at 17:11
  • I create a ftp user with a password and then without a password, but with the 2 gives me the error on the client filezilla – brito9112 Oct 06 '16 at 17:16
  • How did you create that `AuthUserFile`, exactly? – Castaglia Oct 06 '16 at 17:28
  • 2016-10-04 09:11:04,776 college proftpd[26078] x.x.x.x (x.x.x.x[x.x.x.x]): FTP session opened. 2016-10-04 13:11:04,906 college proftpd[26078] x.x.x.x (x.x.x.x[x.x.x.x]): Preparing to chroot to directory '/home/college/ftp' 2016-10-04 13:11:04,906 college proftpd[26078] x.x.x.x (x.x.x.x[x.x.x.x]): ANON ftp: Login successful. – brito9112 Oct 06 '16 at 17:33
  • i use ftpasswd tool – brito9112 Oct 06 '16 at 18:32
  • After the "ANON ftp: Login successful" log message, there should be _other_ messages in the debug logging, which should provide further information on the login failure. There are several different checks performed, post-authentication; we need to discover which one of those is the issue. – Castaglia Oct 06 '16 at 20:13
  • the problem is the password of the anonymous user, no matter if i autenticate against the system pam o my auth file, proftpd ask for a password and kill my anonymous session. Temporaly i resolv the situation creating a nfs shared folder whit my pc and i copy manualy every file in my ftp, but i think this is not a solution. – brito9112 Oct 12 '16 at 16:23

0 Answers0