Gaurav, We are doing something similar.
I created a subclass of org.apache.ftpserver.ftplet.UserManager and declare it in my Spring FTP server config: <ftp:server id="ftpServer" anon-enabled="false" max-anon-logins="-1"> <ftp:listeners> .....// listener definition </ftp:listeners> <ftp:ftplets> <ftp:ftplet name="uploadHandler"> <ref bean="uploadHandlerFtplet"/> </ftp:ftplet> </ftp:ftplets> <ftp:user-manager> <bean id="userManager" class="com.marin.plugin.ftpserver.MarinPasswordAuthenticator"> .....(my constructor args) </bean> </ftp:user-manager> </ftp:server> The UserManager subclass deals with authenticating the incoming users via the DB connection via the authenticate(Authentication authentication) method. I believe that it's cleaner to use the UserManager for authentication, and then you can use the Ftplet methods to perform additional custom tasks if necessary. On Mon, Dec 12, 2011 at 9:01 AM, gaurav chopra <gaurav.chopr...@gmail.com> wrote: > Hi > > I need to authenticate users logging onto FTP server by validating record > against Database entry. For this i need to create DbUserManager and attach > that userManager to server, while ftp server creation. I see that there is > another Ftplet where there are certain hook methods, like onConnect where i > can validate the logged user with the UserManager created. > Is my understanding correct?If correct then how can i authenticate user in > the onConnect hook method? If not ,what is the process to achieve this? > > > -- > Regards, > Gaurav Chopra