protected void createUsers()
{
try
{
PropertiesUserManager propertiesUserManager = new PropertiesUserManager();
propertiesUserManager.setPropFile( ftpUserPropertiesFile );
BaseUser ftpUser = new BaseUser();
ftpUser.setName( userName );
ftpUser.setPassword( password );
ftpUser.setHomeDirectory( ftpHomeDir.getAbsolutePath() );
Authority[] auths = { new WritePermission() };
ftpUser.setAuthorities( auths );
ftpUser.setEnabled( true );
propertiesUserManager.configure();
propertiesUserManager.save( ftpUser );
BaseUser adminUser = new BaseUser();
adminUser.setName( "admin" );
adminUser.setHomeDirectory( ftpHomeDir.getAbsolutePath() );
propertiesUserManager.save( adminUser );
}
catch (FtpException e)
{
log.error( e );
}