Ok, I figured this out by implementing my own FileSystemView interface, and 
related interfaces, and I can detect when a user tries to cd .. up to a parent 
dir -- if I detect this, I'm just throwing a RuntimeException and the client 
just gets an error indicating the SFTP command was not received.

Technically this works, but it isn't clear to me how to do this gracefully so 
they would get some kind of permissions error.

This is in my own implementation of FileSystemView#getFile(String file) which 
returns SshFile.  Is there some way to code this, so the Sftp subsystem will 
return some kind of auth or permissions error to the client?

-----Original Message-----
From: Davis Ford 
Sent: Friday, September 09, 2011 3:42 PM
To: '[email protected]'
Subject: RE: sftp questions

Guillame -- Thanks for the info, appreciate it.  One other quick follow-up if I 
may - is there an easy way to pin a client into a specific directory for 
uploads?


Reply via email to