// replace the default listener
serverFactory.addListener("default", factory.createListener());
PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();
UserManager um = userManagerFactory.createUserManager();
BaseUser user = new BaseUser();
user.setName("admin");
user.setPassword("admin");
List<Authority> authorities = new ArrayList<Authority>();
authorities.add( new WritePermission() );
user.setAuthorities( authorities );
user.setHomeDirectory( ftpHomeDir.getAbsolutePath() );
um.save(user);
serverFactory.setUserManager( um );
server = serverFactory.createServer();