As Niklas said I think you should extend AbstractUserManager (or just
implement UserManager) Or are you using /etc/password for authentication and
you want to extract the user information from a database? It doesn't sound
very likely.
If you are starting FTPServer programatically, you will use FTPServerFactory
setUserManager method (the argument is the class you implemented) while if
you're using the Spring facility, you have to use the <user-amanger> tag ,
e.g:
<user-manager>
<beans:bean class="full-name-of-your-class">
<beans:constructor-arg index="0" type="java.lang.String"
value="whateverArgumentYouMayNeed"/>
</beans:bean>
</user-manager>



2009/1/20 Niklas Gustavsson <nik...@protocol7.com>

> On Tue, Jan 20, 2009 at 5:18 AM, Javi <j...@valenciacf.org> wrote:
> > I want to modify DbUserManager in order to authenticate vs Linux
> > password/shadow file, in order to create a custom authenticator how
> should
> > I register my class?
>
> I would not recommend extending the DbUserManager in order to develop
> this user manager, instead have a look at extending
> AbstractUserManager. Are you looking into using JPam for this? Would
> you maybe be interested in donating such a solution back to the
> project?
>
> > Additionally ftpd.sh runs as user "root" in order to have correct
> > permissions to chown incoming files, and make the owner to the unix user
> > who created them.
>
> Running a network server as root is never a good idea. I'm not sure
> how other FTP servers handle setting the correct ownership, but you
> could have a look at that. We do not support setting the owner of the
> files today, and before the JRE offers this, that is, when NIO2 ships.
>
> > However I allways gets the files owned by the user running the Java
> process.
> > Also when I display files they belong to user:group even if they are
> owned
> > by other user:
> >
> > ftp> ls
> > 200 Command PORT okay.
> > 150 File status okay; about to open data connection.
> > dr-x------   3 user group            0 Jan 18 23:56 A
> > dr-x------   3 user group            0 Jan 18 23:56 B
> > dr-x------   3 user group            0 Jan 18 23:56 C
> > 226 Closing data connection.
> >
> > Is possible to dislay files as real owner?
>
> hi
>
> /niklas
>

Reply via email to