Hello,
I am trying to embed the Apache FTP server into my code. I have a
property file containing a single user but when I try to connect, I get
a 530 error.
Here's the content of my property file:
ftpserver.user.test.homedirectory=./test-tmp/ftproot
ftpserver.user.test.maxloginnumber=3
ftpserver.user.test.enableflag=true
ftpserver.user.test.writepermission=true
ftpserver.user.test.userpassword=password
Here's the code for the user management:
PropertiesUserManagerFactory userManagerFactory = new
PropertiesUserManagerFactory();
userManagerFactory.setFile(new File("ftpusers.properties"));
UserManager um = userManagerFactory.createUserManager();
serverFactory.setUserManager(um);
I've tried adding this code for investigation purposes:
users = um.getAllUserNames();
System.out.println(users.length);
but 0 is printed. So it seems the user configuration from the property
file was not loaded.
Can someone point out if I missed a particular step.
Thanks.
Dustine