I am trying to connect from the same computer using the filezilla client.
I have tried the default users.properties from the 1.0.6 distribution with
both ClearTextPasswordEncryptor and SaltedPasswordEncryptor and both
anonymous and admin/admin show the same results.
I don't think it is a firewall issue as I would expect the client to not
even be able to connect to the server. It seems to connect then the server
closes the connection immediately.
Thanks,
TRAVIS BOWEN
Staff Software Engineer
IBM Systems & Technology Group, Client Enablement & Systems Assurance
From: John Hartnup <[email protected]>
To: [email protected],
Date: 05/21/2013 01:02 PM
Subject: Re: No users can connect, no error.
This like the work of a firewall rejecting anonymous Ftp. You could verify
this by trying to log in from a client on the same system as the server, or
by changing the configuration to use a username other than "anonymous".
On 21 May 2013 20:28, "Travis Bowen" <[email protected]> wrote:
> First I'd like to thank you for providing this software.
>
> However, the documentation is somewhat lacking. I've spent several hours
> just trying to get the embedded version to accept user logins.
>
> Here is the code I am using (drawn from the quickstart docs and other
> sources):
>
> FtpServerFactory serverFactory = *new* FtpServerFactory();
> ListenerFactory listenerFactory = *new* ListenerFactory();
>
> // set the port of the listener
> listenerFactory.setPort(*props*.getFtpPortProperty());
> Listener listener = listenerFactory.createListener();
>
> // replace the default listener
> serverFactory.addListener("default", listener);
>
> Map<String, Ftplet> ftpletMap = *new* HashMap<String, Ftplet>();
> ftpletMap.put("IBMFtplet", *new* IBMFtplet(*this*));
>
> serverFactory.setFtplets(ftpletMap);
>
> ConnectionConfigFactory connectionConfigFactory = *new*
> ConnectionConfigFactory();
> connectionConfigFactory.setAnonymousLoginEnabled(*true*);
>
>
> serverFactory.setConnectionConfig
(connectionConfigFactory.createConnectionConfig());
>
> PropertiesUserManagerFactory userManagerFactory = *new*
> PropertiesUserManagerFactory();
> userManagerFactory.setFile(*new* File("users.properties"));
> userManagerFactory.setPasswordEncryptor(*new*
> ClearTextPasswordEncryptor());
> UserManager userManager = userManagerFactory.createUserManager();
>
> UserFactory userFactory = *new* UserFactory();
> userFactory.setName("anonymous");
> userFactory.setPassword("");
> userFactory.setHomeDirectory("/tmp");
>
> List<Authority> auths = *new* ArrayList<Authority>();
> Authority auth = *new* WritePermission();
> auths.add(auth);
> userFactory.setAuthorities(auths);
>
> User user = userFactory.createUser();
>
> userManager.save(user);
> serverFactory.setUserManager(userManager);
>
> // start the server
> FtpServer server = serverFactory.createServer();
>
> server.start();
>
> Here is the output:
>
> [NioProcessor-3] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - CREATED
> [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - OPENED
> [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - SENT: 220 Service ready for new user.
>
> [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - RECEIVED: USER anonymous
> [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - CLOSED
> [NioProcessor-4] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
-
> CREATED
> [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - OPENED
> [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - SENT: 220 Service ready for new user.
>
> [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - RECEIVED: USER anonymous
> [pool-3-thread-1] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - CLOSED
> [NioProcessor-5] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
-
> CREATED
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - OPENED
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - SENT: 220 Service ready for new user.
>
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - RECEIVED: USER anonymous
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - CLOSED
> [NioProcessor-6] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
-
> CREATED
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - OPENED
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - SENT: 220 Service ready for new user.
>
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - RECEIVED: USER anonymous
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - CLOSED
> [NioProcessor-7] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
-
> CREATED
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - OPENED
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - SENT: 220 Service ready for new user.
>
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - RECEIVED: USER anonymous
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - CLOSED
> [NioProcessor-8] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
-
> CREATED
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - OPENED
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - SENT: 220 Service ready for new user.
>
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - RECEIVED: USER anonymous
> [pool-3-thread-2] INFO org.apache.ftpserver.listener.nio.FtpLoggingFilter
> - CLOSED
>
> here is the users.properties file:
>
> #Generated file - don't edit (please)
> #Tue May 21 10:08:40 MST 2013
> ftpserver.user.anonymous.writepermission=true
> ftpserver.user.anonymous.idletime=0
> ftpserver.user.anonymous.userpassword=
> ftpserver.user.anonymous.enableflag=true
> ftpserver.user.anonymous.homedirectory=/tmp
>
>
> It seems to automatically close the connection for any user (I also tried
> the default admin/admin).
>
> Thanks,
>
> *TRAVIS BOWEN *
> Staff Software Engineer
> IBM Systems & Technology Group, Client Enablement & Systems Assurance
>