You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by "Vullhorst, Wolfgang" <wv...@s-und-n.de> on 2010/12/10 13:52:03 UTC

SSHD / SftpSubsystem: How to build a chroot environment

Hi,

  I started with Apache MINA/SSHd yesterday and up to now  managed to integrate the SftpSubsystem and to handle the password and certificate authentication to my demands.
Now I would like to set the SFTP "view" to a limited environment (a special folder on my machine) that cannot be left by the client. Under UNIX this is possible by defining a chroot environment but I cannot find any hints in the MINA/SSHd/SftpSubsystem context.
Could anyone please give me a hint how to manage this?

Best regards,
  Wolfgang

Re: SSHD / SftpSubsystem: How to build a chroot environment

Posted by Guillaume Nodet <gn...@gmail.com>.
If you look at the org.apache.sshd.server.filesystem package, you'll
see NativeFileSystemFactory and NativeFileSystemView which can be used
to create the file system used by SFTP.  I think you're requirement is
fairly general and common, so we should make both classes support this
use case easily.   You can write your own classes, but a patch on the
existing ones would be awesome !

On Fri, Dec 10, 2010 at 13:52, Vullhorst, Wolfgang
<wv...@s-und-n.de> wrote:
> Hi,
>
>  I started with Apache MINA/SSHd yesterday and up to now  managed to integrate the SftpSubsystem and to handle the password and certificate authentication to my demands.
> Now I would like to set the SFTP "view" to a limited environment (a special folder on my machine) that cannot be left by the client. Under UNIX this is possible by defining a chroot environment but I cannot find any hints in the MINA/SSHd/SftpSubsystem context.
> Could anyone please give me a hint how to manage this?
>
> Best regards,
>  Wolfgang
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com