The FileSystemView has been introduced for that very purpose. Here is an example that restricts the file system to a certain directory (in that case indicated by System.getProperty("karaf.base"))
https://github.com/apache/karaf/blob/karaf-2.x/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/KarafFileSystemView.java 2013/9/17 Joseph Hickman <jhick...@dtccom.net> > I need to restrict the directory(ies) a logged-in SFTP user is able to > access. Two solutions are proposed on this board: > > * A custom implemenation of FileSystemView, as per > http://www.mail-archive.com/users@mina.apache.org/msg04444.html > > OR > > * Override the start method of SftpSubSystem, as per > http://www.mail-archive.com/users@mina.apache.org/msg03137.html > > > Both of these suggestions refer to SFTP and I'm wondering if one approach > is recommended over the other? Does anyone have an implementation they are > willing to share? > > Thanks. > > ~Joseph > -- ----------------------- Guillaume Nodet ------------------------ Red Hat, Open Source Integration Email: gno...@redhat.com Web: http://fusesource.com Blog: http://gnodet.blogspot.com/