FtpServerFactory serverFactory = new FtpServerFactory();
listenerFactory.setServerAddress("localhost");
listenerFactory.setPort(21);
BaseUser user = new BaseUser();
user.setName("username");
user.setPassword("password");
user.setHomeDirectory("/path/to/home/directory");
UserManager userManager = new PropertiesUserManager(new ClearTextPasswordEncryptor(), new File("path/to/user.properties"));
userManager.save(user);
FtpServer server = serverFactory.createServer();
server.start();
server.stop();