[ 
https://issues.apache.org/jira/browse/SSHD-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108436#comment-17108436
 ] 

Logan commented on SSHD-992:
----------------------------

So whenever a user put a file using sftp, say the file name "file1.txt", we 
internally save it with a unique file name, instead of "file1.txt". Some SFTP 
clients issues stat command after put command. 

That said, I could extend {{SftpSubsystem}} and overwrite doStat() to handle 
that.  Thank you.

I think the small improvements can be made to SftpSubsystemFactory.Builder to 
set custom SftpSubsystem?

 
{code:java}
public Builder withSftpSubsystemFactory(SftpSubsystemFactory 
sftpSubSystemFactory) {
sftpSubsystemFactory = sftpSubsystemFactory;
return this;
}
public SftpSubsystemFactory build() {
SftpSubsystemFactory factory = sftpSubsystemFactory ==null ?  new 
SftpSubsystemFactory() : sftpSubsystemFactory;
...
}
{code}
 

> Customizing sftp stat commands
> ------------------------------
>
>                 Key: SSHD-992
>                 URL: https://issues.apache.org/jira/browse/SSHD-992
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 2.1.0
>            Reporter: Logan
>            Assignee: Lyor Goldstein
>            Priority: Major
>             Fix For: 2.5.0
>
>
> We use SSHD servers to support SFTP functionality that when user uploads a 
> file, we internally create a file with a unique name and handle this upload. 
> While this customization is working it does break some clients that issue 
> stat command after upload. Is there a hook or customization that I can do to 
> handle the stat commands ourselves instead of default handler? Have the same 
> issues with getting attributes of the file too. Probably some hooks similar 
> SftpFileSystemAccessor openFile?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to