Re: Different root and initial directories for SFTP

2018-05-25 Thread Quinn Stevenson
I created https://issues.apache.org/jira/browse/SSHD-825 Quinn Stevenson qu...@pronoia-solutions.com (801) 244-7758 > On May 25, 2018, at 4:43 AM, Stefan Magnus Landrø > wrote: > > That's what I do. > > 2018-05-25 10:37 GMT+02:00 Guillaume

Re: Different root and initial directories for SFTP

2018-05-25 Thread Stefan Magnus Landrø
That's what I do. 2018-05-25 10:37 GMT+02:00 Guillaume Nodet : > Ah, I see. > It's currently not supported unfortunately : please raise a JIRA for that. > In the mean time, you should derive the SftpSubsystem class and override > the getDefaultDirectory method to return the Path you want for the

Re: Different root and initial directories for SFTP

2018-05-25 Thread Guillaume Nodet
Ah, I see. It's currently not supported unfortunately : please raise a JIRA for that. In the mean time, you should derive the SftpSubsystem class and override the getDefaultDirectory method to return the Path you want for the given user. Guillaume 2018-05-24 21:00 GMT+02:00 Quinn Stevenson : > Y

Re: Different root and initial directories for SFTP

2018-05-24 Thread Quinn Stevenson
The JUnit resource I’m working on is here https://github.com/hqstevenson/sftp-junit.git if anyone would like to look. There is a unit test in SftpServerResourceCamelTest that is @Ignored at the moment - I’m trying to figure out how to make that pa

Re: Different root and initial directories for SFTP

2018-05-24 Thread Quinn Stevenson
Yeah - I’ve tried that. What it does is set’s the root of the virtual filesystem to a different spot for that user. So if I set the defaultHomeDir to target/sftp and the userHomeDir for my test user to target/sftp/home/user, the “root” of the virtual filesystem is target/sftp/home/user. What

Re: Different root and initial directories for SFTP

2018-05-24 Thread Guillaume Nodet
Have you tried setting home dirs for your users on the VirtualFileSystemFactory ? vfsf.setUserHomeDir("the user", the_home_dir); 2018-05-24 15:49 GMT+02:00 Quinn Stevenson : > I’m using Mina SSHD (1.7.0) as an embedded SFTP server for unit testing, > and I’ve come across an issue I can’t figure

Different root and initial directories for SFTP

2018-05-24 Thread Quinn Stevenson
I’m using Mina SSHD (1.7.0) as an embedded SFTP server for unit testing, and I’ve come across an issue I can’t figure out. I’m looking for a way to set the initial directory in a virtual filesystem for a user when the login to the SFTP server. I’m simulating some systems that have not chroot-ed