title: Authentication Failed (error 530) with Embedded Apache FTP Server
body: <p>I am embedding the <a href="http://mina.apache.org/ftpserver/" rel="nofollow noreferrer">apache ftpserver</a> in my java web app, I have tried a couple different things and everytime I try to connect to the server via FTP, it says Authentication failed.  I have attached my code, and also the console output when I try to do the logging in.  Does anyone have any suggestions?  I tried running this on OS X and Centos Linux.</p>
  
  <pre><code>PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();
  userManagerFactory.setFile(new File("/ftpdata/myusers.properties"));
  //userManagerFactory.setPasswordEncryptor(new SaltedPasswordEncryptor());
  userManagerFactory.setPasswordEncryptor(new ClearTextPasswordEncryptor());
  UserManager um = userManagerFactory.createUserManager();
  BaseUser user = new BaseUser();
  user.setName("andy");
  user.setPassword("12345678");
  user.setHomeDirectory("/ftpdata/");
  um.save(user);
  
  FtpServerFactory serverFactory = new FtpServerFactory();
  ListenerFactory factory = new ListenerFactory();
  factory.setPort(2225);
  serverFactory.addListener("default", factory.createListener());
  FtpServer server = serverFactory.createServer();
  server.start();
  
  
  
  
  
  
  
  
  12:03:28,768 INFO  [STDOUT] 12:03:28,768 INFO  [DefaultFtpServer] FTP server started
  12:04:14,200 INFO  [STDOUT] 12:04:14,200 INFO  [FtpLoggingFilter] CREATED
  12:04:14,208 INFO  [STDOUT] 12:04:14,208 INFO  [FtpLoggingFilter] OPENED
  12:04:14,228 INFO  [STDOUT] 12:04:14,228 INFO  [FtpLoggingFilter] RECEIVED: USER andy
  12:04:14,230 INFO  [STDOUT] 12:04:14,230 INFO  [FtpLoggingFilter] SENT: 220 Service ready for new user.
  12:04:14,232 INFO  [STDOUT] 12:04:14,232 INFO  [FtpLoggingFilter] SENT: 331 User name okay, need password for andy.
  12:04:14,233 INFO  [STDOUT] 12:04:14,233 INFO  [FtpLoggingFilter] RECEIVED: PASS *****
  12:04:14,236 INFO  [STDOUT] 12:04:14,236 WARN  [PASS] User failed to log in
  12:04:14,736 INFO  [STDOUT] 12:04:14,736 WARN  [PASS] Login failure - andy
  12:04:14,740 INFO  [STDOUT] 12:04:14,740 INFO  [FtpLoggingFilter] RECEIVED: QUIT
  12:04:14,746 INFO  [STDOUT] 12:04:14,746 INFO  [FtpLoggingFilter] SENT: 530 Authentication failed.
  12:04:14,746 INFO  [STDOUT] 12:04:14,746 INFO  [FtpLoggingFilter] SENT: 221 Goodbye.
  12:04:14,747 INFO  [STDOUT] 12:04:14,746 INFO  [FtpLoggingFilter] CLOSED
  </code></pre>