I was able to get this working by creating my own FileSystemView (which was really almost the same as Apache FtpServer's since it already had the functionality) and adding an environment variable for SSHD_BASE to the startup script. SSHD_BASE is the actual directory that the user starts in. When the server gets the system property user.dir in NativeFileSystemView, it is actually that variable.
-----Original Message----- From: David Latorre [mailto:[email protected]] Sent: Tuesday, April 03, 2012 3:33 AM To: [email protected] Subject: Re: User Directory access right Hello Damien, I suggest that next time you state more clearly that you're talking about SSHD subproject. I don't know if they usually write [SSHD] in the subject or something like that. I think you must provide your own implementation of FileSystemView in order to achieve this. It is a nice feature to have, so if you do develop this, it would be great if you could contribute it back :-) 2012/3/30 Damien Butaye <[email protected]> > Hey, > > I saw different question about user directory access right but I > can't find a solution. I would like each time a user logs in the sftp > server, its default directory should be /home/"username" and also that > the user is limited to this directory and sub-directories. > Until now, the directory /home/username is created but the user > doesn't use this directory as the default directory and he is not > limited to this directory. > > Does anyone know how to find a solution for my problem or if there is > no solution? > > Thanks a lot! >
