You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Krishnaveni Mettu (JIRA)" <ji...@apache.org> on 2010/12/01 18:51:11 UTC
[jira] Commented: (VFS-280) Can not put with sfto
[ https://issues.apache.org/jira/browse/VFS-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965764#action_12965764 ]
Krishnaveni Mettu commented on VFS-280:
---------------------------------------
I am running into exact same error.
It works for some SFTP servers but not for others. is there a solution for this ?
File Path: c:\temp\TestFile.txt
sftpUri - sftp://username:password@host
readonly true
org.apache.commons.vfs.FileSystemException: Could not copy "file:///c:/temp/TestFile.txt" to "sftp://username:password@host/TestFile.txt".
at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:902)
at programs.test11.main(test11.java:76)
Caused by: org.apache.commons.vfs.FileSystemException: Could not close the output stream for file "sftp://username:password@host/TestFile.txt".
at org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:599)
at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:107)
at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:893)
... 1 more
Caused by: org.apache.commons.vfs.FileSystemException
at org.apache.commons.vfs.provider.sftp.SftpFileObject$SftpOutputStream.onClose(SftpFileObject.java:433)
at org.apache.commons.vfs.util.MonitorOutputStream.close(MonitorOutputStream.java:63)
at java.io.FilterOutputStream.close(Unknown Source)
at org.apache.commons.vfs.util.MonitorOutputStream.close(MonitorOutputStream.java:53)
at org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:595)
... 3 more
Caused by: Permission denied.
at com.jcraft.jsch.ChannelSftp.throwStatusError(Unknown Source)
at com.jcraft.jsch.ChannelSftp.put(Unknown Source)
at com.jcraft.jsch.ChannelSftp.put(Unknown Source)
at org.apache.commons.vfs.provider.sftp.SftpFileObject$SftpOutputStream.onClose(SftpFileObject.java:428)
... 7 more
> Can not put with sfto
> ---------------------
>
> Key: VFS-280
> URL: https://issues.apache.org/jira/browse/VFS-280
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.0
> Reporter: Harry Greijer
>
> Hi.
> Server side:
> I have a OpenSSH server on windowsserver 2003.
> I use the local ftp server.
> Client side:
> I test connecting with filezilla client. That works just fine, Put and Get..
> But when running on java side with: jsch-0.1.42.jar and commons-vfs-1.0.jar.
> I get following error.
> Why is that?
> DEBUG - putFile: sftp://<myuserid/mypasswd>@<myserver>/AUTF8B.TXT
> DEBUG - putFile: file:///C:/tmp/AUTF8B.TXT
> DEBUG - putFile: sftp://<myuserid/mypasswd>@<myserver>/
> org.apache.commons.vfs.FileSystemException: Could not copy "file:///C:/tmp/AUTF8B.TXT" to "sftp://<myuserid/mypasswd>@<myserver>/AUTF8B.TXT".
> at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:902)
> at ftp.SecFTP.put(SecFTP.java:105)
> at ftp.SecFTP.put(SecFTP.java:74)
> at ftp.TestSecFTP.main(TestSecFTP.java:57)
> at ftp.TestSecFTP.main(TestSecFTP.java:47)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at net.ibs.integrator.util.ITRLauncher.callMain(ITRLauncher.java:56)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at net.ibs.integrator.util.ITRStart.callMain(ITRStart.java:61)
> Caused by: org.apache.commons.vfs.FileSystemException: Could not close the output stream for file "sftp://<myuserid/mypasswd>@<myserver>/AUTF8B.TXT".
> at org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:599)
> at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:107)
> at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:893)
> ... 14 more
> Caused by: org.apache.commons.vfs.FileSystemException: Unknown message with code "Permission denied".
> at org.apache.commons.vfs.provider.sftp.SftpFileObject$SftpOutputStream.onClose(SftpFileObject.java:433)
> at org.apache.commons.vfs.util.MonitorOutputStream.close(MonitorOutputStream.java:63)
> at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
> at org.apache.commons.vfs.util.MonitorOutputStream.close(MonitorOutputStream.java:53)
> at org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:595)
> ... 16 more
> Caused by: 3: Permission denied
> at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2289)
> at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:485)
> at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:439)
> at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:406)
> at org.apache.commons.vfs.provider.sftp.SftpFileObject$SftpOutputStream.onClose(SftpFileObject.java:428)
> ... 20 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.