You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by David Latorre <dv...@gmail.com> on 2012/04/03 09:33:21 UTC

Re: User Directory access right

Hello Damien,

  I suggest that next time you state more clearly that you're talking about
 SSHD subproject. I don't know if they usually write [SSHD] in the subject
or something like that.

I think you must provide your own implementation  of FileSystemView  in
order to achieve this.  It is a nice feature to have, so if you do develop
this, it would be great if you could contribute it back :-)




2012/3/30 Damien Butaye <da...@gmail.com>

> Hey,
>
>  I saw different question about user directory access right but I can't
> find a solution. I would like each time a user logs in the sftp server, its
> default directory should be /home/"username" and also that the user is
> limited to this directory and sub-directories.
> Until now, the directory /home/username is created but the user doesn't use
> this directory as the default directory and he is not limited to this
> directory.
>
> Does anyone know how to find a solution for my problem or if there is no
> solution?
>
> Thanks a lot!
>

RE: How to implement FtpServer Ftplet like actions in Apache SSHD

Posted by "Wright, Omari" <Om...@solers.com>.
Nevermind, I figured it out. I just had to take the file handles and compare the inputPos and outputPos to the file size.

-----Original Message-----
From: Wright, Omari [mailto:Omari.Wright@solers.com] 
Sent: Tuesday, April 10, 2012 8:37 AM
To: 'users@mina.apache.org'
Subject: RE: How to implement FtpServer Ftplet like actions in Apache SSHD

It turns out that the close operation is called at the end of file writes and file reads. Is there any way to distinguish between the two in the SFTP subsystem at the end of the operations?

RE: How to implement FtpServer Ftplet like actions in Apache SSHD

Posted by "Wright, Omari" <Om...@solers.com>.
It turns out that the close operation is called at the end of file writes and file reads. Is there any way to distinguish between the two in the SFTP subsystem at the end of the operations?

RE: User Directory access right

Posted by "Wright, Omari" <Om...@solers.com>.
I was able to get this working by creating my own FileSystemView (which was really almost the same as Apache FtpServer's since it already had the functionality) and adding an environment variable for SSHD_BASE to the startup script. SSHD_BASE is the actual directory that the user starts in. When the server gets the system property user.dir in NativeFileSystemView, it is actually that variable.

-----Original Message-----
From: David Latorre [mailto:dvlato@gmail.com] 
Sent: Tuesday, April 03, 2012 3:33 AM
To: users@mina.apache.org
Subject: Re: User Directory access right

Hello Damien,

  I suggest that next time you state more clearly that you're talking about  SSHD subproject. I don't know if they usually write [SSHD] in the subject or something like that.

I think you must provide your own implementation  of FileSystemView  in order to achieve this.  It is a nice feature to have, so if you do develop this, it would be great if you could contribute it back :-)




2012/3/30 Damien Butaye <da...@gmail.com>

> Hey,
>
>  I saw different question about user directory access right but I 
> can't find a solution. I would like each time a user logs in the sftp 
> server, its default directory should be /home/"username" and also that 
> the user is limited to this directory and sub-directories.
> Until now, the directory /home/username is created but the user 
> doesn't use this directory as the default directory and he is not 
> limited to this directory.
>
> Does anyone know how to find a solution for my problem or if there is 
> no solution?
>
> Thanks a lot!
>