You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Corey Sherman <cs...@gmail.com> on 2010/02/08 16:56:13 UTC

Finding user's home directory

I have configured the ftp server so that each user has their own home
directory using the user.properties file. The user is uploading files to the
server and then I access the file and perform various actions on it. I build
the file path string like so

String filePath = ftpRoot +
session.getFileSystemView().getWorkingDirectory().getAbsolutePath() +"/"+
request.getArgument();
where ftpRoot is the location to the ftp servers file path.

This worked fine until I added the users personal home directory. There
seems to be no way to get the users home path as configured in
user.properties from the session handler. I've tried using getHomeDirectory
and get WorkingDirectory. Am I just overlooking one of the methods or is
there no way to find this value programmatically?

Re: Finding user's home directory

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Mon, Feb 8, 2010 at 4:56 PM, Corey Sherman <cs...@gmail.com> wrote:
> This worked fine until I added the users personal home directory. There
> seems to be no way to get the users home path as configured in
> user.properties from the session handler. I've tried using getHomeDirectory
> and get WorkingDirectory. Am I just overlooking one of the methods or is
> there no way to find this value programmatically?

User.getHomeDirectory() should return the users home directory. Could
you describe in more details the results your seeing?

/niklas