[
https://issues.apache.org/jira/browse/SSHD-825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490686#comment-16490686
]
Guillaume Nodet commented on SSHD-825:
--------------------------------------
I would rather do the following in addition to my patch above:
{code:java}
Path root = Paths.get("/the/root");
String home = "/home";
sshd.setFileSystemFactory(session -> new RootedFileSystemProvider() {
protected FileSystem newFileSystem(Object src, Path path, Map<String,
?> env) {
return new RootedFileSystem(this, path, env) {
@Override
public RootedPath getDefaultDir() {
return getPath(home, session.getUsername());
}
};
}
}.newFileSystem(root, null));
{code}
> Add support for non-chrooted SFTP users with a virtual filesystem
> -----------------------------------------------------------------
>
> Key: SSHD-825
> URL: https://issues.apache.org/jira/browse/SSHD-825
> Project: MINA SSHD
> Issue Type: Improvement
> Affects Versions: 1.7.0
> Reporter: Quinn Stevenson
> Assignee: Guillaume Nodet
> Priority: Minor
> Fix For: 2.0.0
>
>
> When the SshServer is configured for SFTP with a VirtualFileSystemFactory,
> the user is always chrooted to either the defaultHomeDir or the specific
> homeDir for the user.
> However, in order to simulate systems that are configured such that users are
> not chrooted, there should be a way to configure the system with a virtual
> root and a home directory for the use in that virtual root that is also the
> initial directory for the user when they login.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)