UserManager userManager = context.getUserManager();
BaseUser adminUser = new BaseUser();
adminUser.setName("admin");
adminUser.setPassword("admin");
adminUser.setEnabled(true);
adminUser.setAuthorities(new Authority[] { new WritePermission() });
Path adminUserHome = new Path(ftpServerRoot, "user/admin");
adminUser.setHomeDirectory(adminUserHome.toUri().getPath());
adminUser.setMaxIdleTime(0);
userManager.save(adminUser);